Answers for "regular expression to match only alphanumeric characters and spaces"

5

regex to identify numeric and alphanumeric

"^[a-zA-Z0-9_]*$"
Posted by: Guest on December-23-2019
0

alphanumeric with space regex

var regex = new RegExp("^[A-Za-z0-9? ,_-]+$");
            var key = String.fromCharCode(event.charCode ? event.which : event.charCode);
            if (!regex.test(key)) {
                event.preventDefault();
                return false;
            }
Posted by: Guest on June-21-2021

Code answers related to "regular expression to match only alphanumeric characters and spaces"

Browse Popular Code Answers by Language