mercredi 24 mai 2017

VBA validate list of emails using pattern

I have got list of emails in a cell separated by semi-colons and space but i have got the pattern which validates emails only if they are separated by semi-colons. Where do I insert the space to fit my pattern?

Example of emails: aaa@bbb.com; ccc@eee.com; fff@ggg.com

Amount of email addresses in a single cell varies from 1 to 20

Pattern validating emails separated by semi-colons:

^(([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+([;.](([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+)*$

Aucun commentaire:

Enregistrer un commentaire