0


I try to run query in CouchDB 2.3.1 with russian language data using regex and get nothing:

{
   "selector": {
      "class_name": "cat.patients",
      "name": {
         "$regex": "(?i)ИВАНОВА"
      }
   }
}

But this query works:

{
   "selector": {
      "class_name": "cat.patients",
      "name": {
         "$regex": "Иванова"
      }
   }
}

What is the problem here?

matthias_h
  • 11,356
  • 9
  • 22
  • 40
  • Maybe: https://stackoverflow.com/questions/1716609/how-to-match-cyrillic-characters-with-a-regular-expression as ^[\p{L}]+$ matches ИВАНОВА – MDR Mar 18 '20 at 16:32
  • 1
    Does this answer your question? [How to match Cyrillic characters with a regular expression](https://stackoverflow.com/questions/1716609/how-to-match-cyrillic-characters-with-a-regular-expression) – RamblinRose Mar 18 '20 at 17:17
  • 1
    I think that I found answer. In this link [link](https://docs.couchdb.org/en/2.2.0/api/database/find.html) said >A regular expression pattern to match against the document field. Only matches when the field is a string value and matches the supplied regular expression. The matching algorithms are based on the Perl Compatible Regular Expression (PCRE) library. For more information about what is implemented, see the see the Erlang Regular Expression" – Alexey Zarodov Mar 19 '20 at 07:29

0 Answers0