Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / April 2007

Tip: Looking for answers? Try searching our database.

Email fomatting pattern

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris D - 15 Apr 2007 02:14 GMT
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
S.Y.M. Wong-A-Ton - 16 Apr 2007 01:50 GMT
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 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
Chris D - 16 Apr 2007 02:04 GMT
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

> Try this one:
>
[quoted text clipped - 9 lines]
> > ^\+?[a-z0-9](([-+.]|[_]+)?[a-z0-9]+)*@([a-z0-9]+(\.|\-))+[a-z]{2,6}$ in the
> > custom pattern but that was rejected. Thanks ... Chris
S.Y.M. Wong-A-Ton - 16 Apr 2007 04:10 GMT
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

> 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
[quoted text clipped - 13 lines]
> > > ^\+?[a-z0-9](([-+.]|[_]+)?[a-z0-9]+)*@([a-z0-9]+(\.|\-))+[a-z]{2,6}$ in the
> > > custom pattern but that was rejected. Thanks ... Chris
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.