# Detecting date from string input

**URL:** <https://discuss.elastic.co/t/detecting-date-from-string-input/267305>\
**Category:** Elasticsearch\
**Created:** [March 15, 2021, 7:58pm UTC](https://discuss.elastic.co/t/detecting-date-from-string-input/267305 "2021-03-15T19:58:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![macctown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/macctown/32/85581_2.png) [@macctown](https://discuss.elastic.co/u/macctown)\
**Post date:** [March 15, 2021, 7:58pm UTC](https://discuss.elastic.co/t/detecting-date-from-string-input/267305/1 "2021-03-15T19:58:10Z")

</div>

Hi I'm trying to find a way to get possible "date" information from user input string.

Input - a string that may contain date information, for example: "UK basketball", "US sports 2019", "sports 2019/12/23"

After sending the string to an ES tokenizer, the expected output should be -  
UK =\> word, basketball =\> word  
US =\> word, sports =\> word, 2019 =\> date  
sports =\> word, 2019/12/23 =\> date

Can this issue be solved by an existing ES tokenizer? or do I have to create a custom tokenizer? Could you suggest a possible direction for me to look into? Thanks!

---

<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:** [April 12, 2021, 7:59pm UTC](https://discuss.elastic.co/t/detecting-date-from-string-input/267305/2 "2021-04-12T19:59:08Z")

</div>

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