InfoPath
(1)
ChrisRE
(1)
Expression
(1)
Chris
(1)
Pattern
(1)
Supplied
(1)
Email
(1)
Brackets
(1)

Email fomatting pattern

Asked By Chris
14-Apr-07 09:14 PM
Hi can someone please show me how to verify for a correct email syntax. I
tried entering
^\+?[a-z0-9](([-+.]|[_]+)?[a-z0-9]+)*@([a-z0-9]+(\.|\-))+[a-z]{2,6}$ in the
custom pattern but that was rejected. Thanks ... Chris

Email fomatting pattern

Asked By SYMWongATo
15-Apr-07 08:50 PM
Try this one:

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

You need to remove the beginning ^ and ending $ from any regular expression
you try to use in InfoPath, otherwise you'll get back an error.
---
S.Y.M. Wong-A-Ton

Hi S.Y.M. thanks but nope it still comes up with '...

Asked By Chris
15-Apr-07 09:04 PM
Hi S.Y.M. thanks but nope it still comes up with '... one or more errors' &
referenced the square brackets. Tried replacing those with regular brackets
but it the had issue with the '\'. Any thoughts?? Thanks again ... Chris

Chris, did you try the expression I supplied or are you still trying to get

Asked By SYMWongATo
15-Apr-07 11:10 PM
Chris, did you try the expression I supplied or are you still trying to get
your own to work? And where are you using this regular expression? In data
validation? The expression I supplied you with worked when I last tried it. I
get errors when trying yours, so there must be something wrong with it. Does
it work in other applications or code that uses regular expressions? You may
want to try another newsgroup (csharp or comp.lang.perl.misc) to help you
troubleshoot your pattern.
---
S.Y.M. Wong-A-Ton
Post Question To EggHeadCafe