Regex Email in Elastic Search

Hi Every Body
I have a Text field
it have a lot of text . I want to extract Email Address from this text.
how can extract Email Address using Regex in Elastic Search?

What for? I mean you want to extract that to a field?

You can use an ingest pipeline probably for that.
Also have a look at ingest nlp project which tries to automatically recognize emails and other entities.

if i want to user Regex how can solve it?

I don't understand the question. May be explain with an example?

for example:
i have a field its name is body
its have some records contains email address
i want to select records include email. how can select with Regex in ES?

Probably something I'd avoid doing though: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html

yes - i create a regex with your link
this is my regex : " [a-zA-Z]+@[a-zA-Z]+.[a-zA-Z]+ "
is it work but it have a problem
for example : @aaaa match with this regex
but your link says its not match.
give me a regex for elasticsearch that i match with test@gmail.com and not matched with @gmail.com

I don't know. I'm not good at writing regex.

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