Elastic Search Regex are not working as expected
You need to run the regexp query against the content.keyword field
curl -XGET 'https://localhost:9200/_search?pretty' -H 'Content-Type: application/json' -H 'Authorization: Basic redacted' -k -d '{
  "query": { "regexp": { "content.keyword": "key[0-9A-Za-z_]{18}" } }
}'

PS: easier to test and provide feedback with real content and real queries ;-)

I have go the problem in making elastic search regex work. I have a document that looks like this:
{"content": "keySyAtUXpd8JxrpUH2Sd"}

I have trying the following regex key[0-9A-Za-z_]{18} which perfectly matches with the string in regexer.com but when I query the request from elastic search it doesn't show any hits.
Here's the request that i'm using:
curl -XGET 'https://localhost:9200/_search?pretty' -H 'Content-Type: application/json' -H 'Authorization: Basic redacted' -k -d '{
  "query": { "regexp": { "content": "key[0-9A-Za-z_]{18}" } }
}'

I have also tried the regex with .*key[0-9A-Za-z_]{18}.*, tried to escape - as \\- but it doesn't seems to be working as well.
