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
NoActiveDesktop under LOCAL_MACHINE gets reset to value of 1 after reboot. If NoActiveDesktop key under LOCAL_MACHINE is deleted, it is recreated and assigned a value of 1.
Installing Blackberry Enterprise server on Exchange server itself
Count rows of table between two dates for value in text box
WebBrowser and Knowing when page is loaded
How to show treeview inside combobox
Save Excel file as Pipe delimited text file
SQl SERVER 2008 Installation Error...INSTALLSHAREDWOWDI<wbr />R
WCF Client Proxy Wrapper Configuration Abstraction
Two different certificates in one domain
How do I know what version IIS and IIS management console am I using it.