# Logstash parse multiple instances of the same word into Elasticsearch Array

**URL:** <https://discuss.elastic.co/t/logstash-parse-multiple-instances-of-the-same-word-into-elasticsearch-array/16237>\
**Category:** Elasticsearch\
**Created:** [March 7, 2014, 8:26pm UTC](https://discuss.elastic.co/t/logstash-parse-multiple-instances-of-the-same-word-into-elasticsearch-array/16237 "2014-03-07T20:26:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Portocarrero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jose_portocarrero/32/1743_2.png) [@Jose\_Portocarrero](https://discuss.elastic.co/u/Jose_Portocarrero)\
**Post date:** [March 7, 2014, 8:26pm UTC](https://discuss.elastic.co/t/logstash-parse-multiple-instances-of-the-same-word-into-elasticsearch-array/16237/1 "2014-03-07T20:26:02Z")

</div>

Hi I am trying to extract the following from a log line into 2 different  
array fields

03/07/2014 13:29:43.103 INFO NUM_0000001_DOS0_000001-000000001_ TDKIIDKSSS  
NUM_0000002_DOS_0000002-000000001_ TDKIIDKSSS NUM_0000003_DOS  
_0000003-000000001_ TTDKIIDKSSS NUM_0000004_DOS_0000004-000000001_TDKIIDKSSS NUM  
_0000005_DOS_0000005-000000001_ TDKIIDKSSS

My issue is that from my experience grok works only on fixed patterns. I am  
trying to extract the above numbers from different log lines that would  
have NUM and DOS repeated ranging for 2 times or 100 times.

Is there a way to get mutiple repetitions and put them in an array using  
logstash for elasticsearch to store?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/1b125f34-5bc2-4e14-ab80-ee6901ccab47%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1b125f34-5bc2-4e14-ab80-ee6901ccab47%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:44am UTC](https://discuss.elastic.co/t/logstash-parse-multiple-instances-of-the-same-word-into-elasticsearch-array/16237/2 "2017-07-06T01:44:47Z")

</div>


