# Logstash grok filter for quoted value OR dash

**URL:** https://discuss.elastic.co/t/logstash-grok-filter-for-quoted-value-or-dash/99094
**Category:** Logstash
**Created:** [September 1, 2017, 7:26am UTC](https://discuss.elastic.co/t/logstash-grok-filter-for-quoted-value-or-dash/99094 "2017-09-01T07:26:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Maekee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maekee/32/21708_2.png) [@Maekee](https://discuss.elastic.co/u/Maekee)
#### Post date: [September 1, 2017, 7:26am UTC](https://discuss.elastic.co/t/logstash-grok-filter-for-quoted-value-or-dash/99094/1 "2017-09-01T07:26:50Z")

</div>

Hello,  
I have a blue coat Proxy log that have a field that can either be a quouted value like "Microsoft-CryptoAPI/15.2" or a dash (-).

I captured this with %{QUOTEDSTRING:useragent} Before i found out that the value can be a dash (-)  
Then the filter breaks

Any ideas from the Community?

---

<div class="post-metadata">

### Author: ![Maekee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maekee/32/21708_2.png) [@Maekee](https://discuss.elastic.co/u/Maekee)
#### Post date: [September 1, 2017, 8:25am UTC](https://discuss.elastic.co/t/logstash-grok-filter-for-quoted-value-or-dash/99094/2 "2017-09-01T08:25:42Z")

</div>

Think i solved it, replaced %{QUOTEDSTRING:useragent} with (?\<useragent\>(\".\*\")|-)

---

<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: [September 29, 2017, 8:25am UTC](https://discuss.elastic.co/t/logstash-grok-filter-for-quoted-value-or-dash/99094/3 "2017-09-29T08:25:48Z")

</div>

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