Mutate gsub Email Address

Actually just done it, after more than 20 tries.

I recommend this to find @ in a sentence:

mutate{
gsub => ["col2","(\W|^)[\w.+-]{0,100}@"," @"]
}

It finds the @ and what is before until the first space is found then it replace for @

Hope it helps, if anyone has a better solution, feel free to share!

Cheers

1 Like