Regex for Numbers & Alphabets in Jquery

 

# Regex allows, Numbers, Alphabets

var regex1 = /^[0-9a-zA-Z]*$/;

# Regex allows, Numbers, Alphabets & Special Characters  hyphen(-), front slash(\)

var regex2 = /^[0-9a-zA-Z\-\/]*$/;

Leave a Reply

Your email address will not be published. Required fields are marked *