Ok, the current regex is this:
(?i)^(?:[^@\s]+@(?:[^@\s.]+\.)+[a-z]{2,})(?:\s*[,;]\s*(?:[^@\s]+@(?:[^@\s]+\.)+[a-z]{2,}))*$
It is failing to match john.smith@abc.p1
because there is a number(1) in the .p1
part of the email.
So in your regex.., in this part: [a-z]{2,}
. You just need to allow for a 1
or the whole number set 0-9
like so: [a-z0-9]{2,}
or [a-z1]{2,}
So this is the your full regex, modified to work for your situation:
(?i)^(?:[^@\s]+@(?:[^@\s.]+\.)+[a-z0-9]{2,})(?:\s*[,;]\s*(?:[^@\s]+@(?:[^@\s]+\.)+[a-z0-9]{2,}))*$
Working regex example: