# Date filter help

**URL:** <https://discuss.elastic.co/t/date-filter-help/142433>\
**Category:** Logstash\
**Created:** [July 31, 2018, 7:36pm UTC](https://discuss.elastic.co/t/date-filter-help/142433 "2018-07-31T19:36:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastian\_Herrera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebastian_herrera/32/53209_2.png) [@Sebastian\_Herrera](https://discuss.elastic.co/u/Sebastian_Herrera)\
**Post date:** [July 31, 2018, 7:36pm UTC](https://discuss.elastic.co/t/date-filter-help/142433/1 "2018-07-31T19:36:20Z")

</div>

Hello i am wondering to parse this date in logstash filter July 31st 2018, 09:28:01.000 but i am not able to find the way to match the st part. can anyone give me help?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 31, 2018, 9:17pm UTC](https://discuss.elastic.co/t/date-filter-help/142433/2 "2018-07-31T21:17:39Z")

</div>

I would use gsub to remove it.

```
 mutate { gsub => ["someField", "(^[^:space:]+ [0-9]+)(st|rd|th)", "\1" ] }

```

\1 refers to the first capture group, which is the first set of parentheses.

---

<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:** [August 28, 2018, 9:17pm UTC](https://discuss.elastic.co/t/date-filter-help/142433/3 "2018-08-28T21:17:42Z")

</div>

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