'Converting regex to lucene in Elasticsearch Query DSL
I am trying to convert this regex to work in Kibana in a query search and can't seem to get it to work
((\+[2-9]|[2-9]){1}\d{10,}$)|((\+[2-9]){1}\d{8,}$)|((\+{0,1}1){0,1}((340)|(670)|(671)|(684)|(787)|(939)|(242)|(246)|(264)|(268)|(284)|(345)|(441)|(473)|(649)|(876)|(658)|(664)|(721)|(758)|(767)|(784)|(809)|(829)|(849)|(868)|(869)){1}\d{7,})
I get a syntax error at the first "+"
{
  "query": {
    "regexp": {
      "cdr.calledNumber": {
        "value":"((\+[2-9]|[2-9]){1}\d{10,}$)|((\+[2-9]){1}\d{8,}$)|((\+{0,1}1){0,1}((340)|(670)|(671)|(684)|(787)|(939)|(242)|(246)|(264)|(268)|(284)|(345)|(441)|(473)|(649)|(876)|(658)|(664)|(721)|(758)|(767)|(784)|(809)|(829)|(849)|(868)|(869)){1}\d{7,})"
      }
    }
  }
}
Any ideas?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source | 
|---|

 elasticsearch
elasticsearch elasticsearch-dsl
elasticsearch-dsl