Regular expression not able to read complete string, only working correct with single character.
var abc = "ab";
var patter = /^([a-z0-9A-Z])$/;
if (patter.test(abc)) {
console.log('yes');
} else {
console.log('no');
}
Regular expression not able to read complete string, only working correct with single character.
var abc = "ab";
var patter = /^([a-z0-9A-Z])$/;
if (patter.test(abc)) {
console.log('yes');
} else {
console.log('no');
}