Validating multiple email addresses in a text box - InfoPath Dev
in

InfoPath Dev

Validating multiple email addresses in a text box

Last post 09-09-2013 06:56 AM by jdwilliams. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-06-2013 08:15 AM

    Validating multiple email addresses in a text box

    Validation doesn't seem to work like it usually does. I have been using this to validate one ([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?) but I need to validate multiple within one text box separated by a comma. I tried to write the regex that would work in other languages but doesn't seem to work in infopath. I looked around a lot to see if there was a solution to this but could find none. Anyone have the regex for infopath that will work?
  • 09-06-2013 02:19 PM In reply to

    Re: Validating multiple email addresses in a text box

     I pinged a colleague of mine who has a better grip on RegEx - hopefully he'll have some suggestions here. :)

    Hilary Stoupa

  • 09-08-2013 08:51 PM In reply to

    Re: Validating multiple email addresses in a text box

     It would be nice if you had posted the attempts you have made so far, but this seems to work. can you give it a try?:

     ([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\s*,\s*([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3}))*

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 09-09-2013 06:56 AM In reply to

    Re: Validating multiple email addresses in a text box

    It works! Thank you so much. Great help.
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.