Microsoft
Software
Hardware
Network
Question : Need to allow a hyphens ("-") for user names in text field
I have this for a Regular Expression for a user name text field: [0-9a-zA-Z]{6,20}
However, found out that users wanted to add a hyphen or "-" to user names. How can I adjust my regular expression [0-9a-zA-Z]{6,20} to allow the hyphens or "-"?
Answer : Need to allow a hyphens ("-") for user names in text field
You would need to escape the hyphen with a backslash within the character set brackets:
[0-9a-zA-Z\-]{6,20}
Random Solutions
Access 2007 Exit Button ID for ribbon UI
VB.NET: optimal buffer size and speed issues with IO.FileStream
C# SQL Query considerations against a large database
Can an Access command button execute a video file?
System recovery HP Mediasmart Home Server EX 475 - no server found
Date difference not working on routine
Formulas aren't calculating automatically
Creative SB0460 - Windows 7
SQL code conversion for Microsoft Access 2007
Data Set Extract