# Extraxt matching words in text file

**URL:** <https://discuss.elastic.co/t/extraxt-matching-words-in-text-file/179156>\
**Category:** Logstash\
**Created:** [April 30, 2019, 9:39pm UTC](https://discuss.elastic.co/t/extraxt-matching-words-in-text-file/179156 "2019-04-30T21:39:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumar4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kumar4/32/48326_2.png) [@kumar4](https://discuss.elastic.co/u/kumar4)\
**Post date:** [April 30, 2019, 9:40pm UTC](https://discuss.elastic.co/t/extraxt-matching-words-in-text-file/179156/1 "2019-04-30T21:40:00Z")

</div>

hi dears, i have a text file (or log) file and i want to know if some words such as "animal" "birds" ... if they exist in my file; can you give me examples of filter input and output in logstach

thank you very much

---

<div class="post-metadata">

**Author:** ![franco.federico](https://avatars.discourse-cdn.com/v4/letter/f/67e7ee/32.png) [@franco.federico](https://discuss.elastic.co/u/franco.federico)\
**Post date:** [April 30, 2019, 10:05pm UTC](https://discuss.elastic.co/t/extraxt-matching-words-in-text-file/179156/2 "2019-04-30T22:05:05Z")

</div>

Hi kumar4

you could try to use the dictionary.

I found this example

> **[Utilizing Dictionaries with Logstash](https://medium.com/@bromiley/utilizing-dictionaries-with-logstash-5e3ab2194da3)**
>
> A little while back, I posted about using logstash to parse Bro IDS logs. In this post, I discussed utilizing a community-contributed…

I hope that this help you  
Ciao  
Franco

---

<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:** [May 28, 2019, 10:12pm UTC](https://discuss.elastic.co/t/extraxt-matching-words-in-text-file/179156/3 "2019-05-28T22:12:56Z")

</div>

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