| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 | [[query-dsl-regexp-query]]=== Regexp QueryThe `regexp` query allows you to use regular expression term queries.See <<regexp-syntax>> for details of the supported regular expression language.*Note*: The performance of a `regexp` query heavily depends on theregular expression chosen. Matching everything like `.*` is very slow aswell as using lookaround regular expressions. If possible, you shouldtry to use a long prefix before your regular expression starts. Wildcardmatchers like `.*?+` will mostly lower performance.[source,js]--------------------------------------------------{    "regexp":{        "name.first": "s.*y"    }}--------------------------------------------------Boosting is also supported[source,js]--------------------------------------------------{    "regexp":{        "name.first":{            "value":"s.*y",            "boost":1.2        }    }}--------------------------------------------------You can also use special flags[source,js]--------------------------------------------------{    "regexp":{        "name.first": {            "value": "s.*y",            "flags" : "INTERSECTION|COMPLEMENT|EMPTY"        }    }}--------------------------------------------------Possible flags are `ALL`, `ANYSTRING`, `AUTOMATON`, `COMPLEMENT`,`EMPTY`, `INTERSECTION`, `INTERVAL`, or `NONE`. Please check thehttp://lucene.apache.org/core/4_3_0/core/index.html?org%2Fapache%2Flucene%2Futil%2Fautomaton%2FRegExp.html[Lucenedocumentation] for their meaninginclude::regexp-syntax.asciidoc[]
 |