Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6035

Extended Regular Expression for email id in bash [duplicate]

$
0
0

While learning about BRE and ERE, I came across this example

grep -E "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}" emails.txt

emails.txt

john.doe@example.comjane_doe123@sub.domain.co.ukinvalid-email@comanother.valid.email+123@gmail.com

output

john.doe@example.comjane_doe123@sub.domain.co.ukanother.valid.email+123@gmail.com

what my doubt is,how this email id jane_doe123@sub.domain.co.uk is matched by the the regex. In particular, the part after the '@' sign. Can anyone teach me? Thanks in advance.


Viewing all articles
Browse latest Browse all 6035

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>