# Can I do an or in a match

**URL:** <https://discuss.elastic.co/t/can-i-do-an-or-in-a-match/36557>\
**Category:** Logstash\
**Created:** [December 7, 2015, 4:34pm UTC](https://discuss.elastic.co/t/can-i-do-an-or-in-a-match/36557 "2015-12-07T16:34:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jackal9301](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jackal9301/32/5748_2.png) [@Jackal9301](https://discuss.elastic.co/u/Jackal9301)\
**Post date:** [December 7, 2015, 4:34pm UTC](https://discuss.elastic.co/t/can-i-do-an-or-in-a-match/36557/1 "2015-12-07T16:34:18Z")

</div>

Is there a way I can write a grok to do something like:

```
grok{
    match => ["Message_Data", "File \"C:\\\\Windows\\Prefetch\\DLL" or "New File \"C:\\\\Windows\\Prefetch\\DLL "]

```

I don't want to have to write to separate statements for this match since i would just be duplicating everything

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [December 7, 2015, 6:41pm UTC](https://discuss.elastic.co/t/can-i-do-an-or-in-a-match/36557/2 "2015-12-07T18:41:03Z")

</div>

Use `|` to separate the different options (often combined with parentheses):

```
(some-subexpression|another-subexpression|...)
```

---

<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:** [July 6, 2017, 5:19am UTC](https://discuss.elastic.co/t/can-i-do-an-or-in-a-match/36557/3 "2017-07-06T05:19:40Z")

</div>

Closed on July 6, 2017, 5:19am UTC


