Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Regular Expresion Validator
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
ASP.NET
Database:
MS SQL Server
Miscellaneous
Thread ID:
01049985
Message ID:
01055641
Views:
14
>Hi All,
>
>On the data entry page I am validating the email address using the following regular expresion validator :
>
>\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
>
>How can I modify the expression to allow the following email address:
>
>first.l'ast@stago-us.com ?
>
>TIA,
>Daniel

Daniel,

The following will work, though there may be a better solution:

\w+([-+.](\w|\')+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*

(My changes are in red. Note that this only allows the ' after the first dot. You'd have to do something like this to allow an apostrophe before and after the first dot:

(\w|\')+([-+.](\w|\')+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*

Regards,
Previous
Reply
Map
View

Click here to load this message in the networking platform