Regexp - Case Insensitive Not working?

Hello,

I am use a regexp query to locate a directory in a 'file.directory'
When I try to run this: "

{
  "regexp": {
    "file.directory": {
      "case_insensitive": true,
      "value": "////home.*"
    }
  }
}

Expected values:

> //home/
> //HOME/
> //Home/

The issue is no results come back.
It seems to be related to my regex but also it works once I remove the beginning "////" and place it with ".*". This returns unwanted values.

Any help?

Hi
Some possible explanations.

  • The forward slash is not in the list of reserved characters
  • Escaping reserved characters is done with a backslash
  • Depending on your mapping the original content may have been tokenised into words and removed the slashes.
    Can you share the mapping?

@Mark_Harwood1 I was using the wrong slashes!

I did also try to use wildcard instead of regexp and it works!

{
  "wildcard": {
    "file.directory": {
      "case_insensitive": true,
      "value": "\\\\home*"
    }
  }
}