Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Understanding a RegEx expression
Message
De
11/03/2014 13:53:56
 
 
À
11/03/2014 13:40:09
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01596120
Message ID:
01596121
Vues:
47
>There is something I am trying to understand with a RegEx expression.
>
>Here is an expression: ([A-Za-z0-9-]{1,20})-([A-Za-z0-9]{1,12})
>
>That one allows alphanumeric characters from anywhere from the 1st to the 20th character. This includes as well a dash starting from position 2.
>
>This is the part I cannot understand. What in there is a representation that the dash is valid from position 2?


I don't think it does. The dash seems to be a valid character in the first grouping, and can therefore be in the first position, as in:
-a15a-a20
-1637-b2
Tested with: http://regexpal.com/
"Your friend in building RegEx pressions." :-)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform