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
Undefined Functions in Access 2003 MDE
Control lock Question
export to excel from dataset
VBA code to prompt user to enter a password when the user wants to access a form or report in DESIGN view
Parsing .aspx page with XMLReader, get a list of controls
Unable to view sharepoint sites from PDA
Determine PrintArea in Excel
Password for installed application?
Announcement Webpart to show on all sites
Receiving error when submitting data to SQL Server through asp.net vb