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.