I have to restrict user's to enter only alphanumeric characters in a text box.
The user must enter both numeric and alphabetical characters.
I have used this [a-zA-Z0-9]+$s regular expression.
Please help me to solve the issue
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jul 31, 2013, 5:15 AM
^(?=.*\d)(?=.*[a-zA-Z])[a-zA-Z0-9]{2,}$
Resmi SatishPosted Jul 31, 2013, 6:13 AM
Iftikar HussainPosted Jul 31, 2013, 5:24 AM
Try like this
Regards,
Iftikar
Sanjeeb LenkaPosted Jul 31, 2013, 4:49 AM
^[0-9a-zA-Z ]+$
OR
^[A-Za-z0-9]*$
USING YOUR REGULAR EXPRESSION WHAT PROBLEM YOU ARE GETTING