check if a string is alphanumeric javascript code example
Example: check if a string is alphanumeric
if (string.match(/^[0-9A-Za-z]+$/) === null) {
//is not alphanumeric
}else{
//it is alphanumeric
}
if (string.match(/^[0-9A-Za-z]+$/) === null) {
//is not alphanumeric
}else{
//it is alphanumeric
}