Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Understanding a RegEx expression
Message
From
11/03/2014 13:53:56
 
 
To
11/03/2014 13:40:09
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01596120
Message ID:
01596121
Views:
46
>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." :-)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform