# EMAILLOCALPART grok pattern

**URL:** <https://discuss.elastic.co/t/emaillocalpart-grok-pattern/170927>\
**Category:** Elasticsearch\
**Created:** [March 5, 2019, 2:14pm UTC](https://discuss.elastic.co/t/emaillocalpart-grok-pattern/170927 "2019-03-05T14:14:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmousikos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kmousikos/32/41566_2.png) [@kmousikos](https://discuss.elastic.co/u/kmousikos)\
**Post date:** [March 5, 2019, 2:14pm UTC](https://discuss.elastic.co/t/emaillocalpart-grok-pattern/170927/1 "2019-03-05T14:14:35Z")

</div>

I'm checking [https://github.com/elastic/elasticsearch/blob/6.6/libs/grok/src/main/resources/patterns/grok-patterns](https://github.com/elastic/elasticsearch/blob/6.6/libs/grok/src/main/resources/patterns/grok-patterns) and I see that EMAILLOCALPART supposes that the local part of an email must be at least 2 characters long and must begin with a latin character. The only restriction I see here [https://en.wikipedia.org/wiki/Email\_address#Local-part](https://en.wikipedia.org/wiki/Email_address#Local-part) is that it cannot start or end with the . character and that it must not be longer than 64 characters (which is also not checked by the existing regex). Which standard is this pattern based on?

---

<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 2, 2019, 2:22pm UTC](https://discuss.elastic.co/t/emaillocalpart-grok-pattern/170927/2 "2019-04-02T14:22:42Z")

</div>

Closed on April 2, 2019, 2:22pm UTC

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