Need help with searching text with special characters

What is the goal of this? What is the use case?

If you want to identify documents that contain email, credit cards, ... then I think you should do that at index time instead of trying to do that at search time.

Could you explain if you really want to do that at search time?

If so, could you share an example of a piece of text which should match the regex but does not? Make the example totally not connected to FSCrawler. FSCrawler is just here a way to collect text. So in your example, just use one single field like:

{
  "content": "foo bar"
}

So could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.