Hello,
I have this simple chain that represent a date (with 2digit year format)
200424
I'm looking for a way to parse it to obtain this output :
year : 20 month : 04 montday : 24
Is it possible with grok to extract part of a string / digit based on start/end position (like php function substr) ?
Thanks
it look this do the job with regexp rather than grok pattern
(?<year>([12]\d{1}))(?<month>(0[1-9]|1[0-2]))(?<monthday>(0[1-9]|[12]\d|3[01]))
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.