# Windows path (backslash-rich) regexp not working

**URL:** <https://discuss.elastic.co/t/windows-path-backslash-rich-regexp-not-working/105275>\
**Category:** Elasticsearch\
**Created:** [October 25, 2017, 4:15pm UTC](https://discuss.elastic.co/t/windows-path-backslash-rich-regexp-not-working/105275 "2017-10-25T16:15:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![oldenbur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oldenbur/32/23406_2.png) [@oldenbur](https://discuss.elastic.co/u/oldenbur)\
**Post date:** [October 25, 2017, 4:15pm UTC](https://discuss.elastic.co/t/windows-path-backslash-rich-regexp-not-working/105275/1 "2017-10-25T16:15:34Z")

</div>

I'm using elastic v5.5.1. I have data that basically looks like windows network path globs that I would like to search for using a regexp. I have simplified the problem down to the following example:

```auto
PUT regexp-test
{ 
  "settings" : { 
    "index" : {
      "number_of_shards" : 1, 
      "number_of_replicas" : 0
    }
  },
  "mappings": {
    "doc": {
      "properties": {
        "path": { 
          "type": "keyword"
        }
      }
    }
  }
}

PUT regexp-test/doc/1/_create
{
    "path" : "\\\\*\\c$",
    "post_date" : "2017-10-23T09:00:00"
}
PUT regexp-test/doc/2/_create
{
    "path" : "\\\\*\\d$",
    "post_date" : "2017-10-23T09:05:00"
}

# this does not match anything, although I expect it to since it should match both
# of the above logs
GET regexp-test/_search
{ 
  "query": { "regexp": { "path": "\\\\\\\\.*\\\\" } } 
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 22, 2017, 4:15pm UTC](https://discuss.elastic.co/t/windows-path-backslash-rich-regexp-not-working/105275/2 "2017-11-22T16:15:46Z")

</div>

Closed on November 22, 2017, 4:15pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
