[ { "QuestionId": "76378346", "QuestionTitle": "How to modify a regular expression to validate a text box with letters and numbers only, excluding certain characters like !@#$%^&*+=", "QuestionBody": "Regular Expression for text box validation. I need to validate textbox. conditions like below\n\ncan enter numbers and letters.\nneed to avoid these characters !@#$%^&*+=\n\nCurrently i am using below regular expression. but it is not working.\n \ncan u help me to find correct regular expression\n", "AnswerId": "76378431", "AnswerBody": "The regulation expression you are currently using is for validate email addresses.\nSo you have to use a regular expression to validate textboxes, make it only contain letters and numbers and avoid the characters (!@#$%^&*+=).\n^[a-zA-Z0-9]+$\n\nThis will match any strings that is a letter or a number. It will not match any strings that any characters !@#$%^&*+=.\n\n\n\n\n\n\nHope this will help. Thank you!\nRefer to this link if you need more clarifications https://laasyasettyblog.hashnode.dev/validating-username-using-regex\nImproving my answer with the question u asked,\n\n\n\n\n
\n