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
Regular Expression for Alphanumeric
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Jul 31, 2013, 1:15 AM EDT
^(?=.*\d)(?=.*[a-zA-Z])[a-zA-Z0-9]{2,}$
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jul 31, 2013, 12:49 AM EDT
^[0-9a-zA-Z ]+$
OR
^[A-Za-z0-9]*$
USING YOUR REGULAR EXPRESSION WHAT PROBLEM YOU ARE GETTING
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 31, 2013, 1:24 AM EDT
Try like this
Regards,
Iftikar
Resmi Satish112 reputationPosted Jul 31, 2013, 2:13 AM EDT