Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Regular Expresion Validator
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
ASP.NET
Database:
MS SQL Server
Divers
Thread ID:
01049985
Message ID:
01055641
Vues:
15
>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,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform