Regular expression for validating multiple email

15 Aug

) $ this pattern works but the funny thing it allows for more than one comma back to back like if I have [email protected],,[email protected] works for some reason....

Here are the list and its properties which help to implement a pattern to search and execute the function.How can I extend my regex above (the first one) to allow multiple mail-addresses to be added while let them be splitted through a semicolon?This is your original expression, changed so that it allows several emails separated by semicolon and (optionally) spaces besides the semicolon.It also allows a single email address that doesn't end in semicolon. You can change the final * by to require at least one address.Important note: as states in the comment by Martin, if there are additional text before or after the correct email address list, the validation will not fail.