on-internet
← Community

How to modify a regular expression to validate a text box with letters and numbers only, excluding certain characters like !@#$%^&*+=

Stack Overflow ·

Regular Expression for text box validation. I need to validate textbox. conditions like below can enter numbers and letters. need to avoid these characters !@#$%^&*+= Currently i am using below regular expression. but it is not working. <input type="text" pattern="^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$" /> can u help me to find correct regular expression

Comments

Sign in or sign up to comment and upvote.

No comments yet.