programming-examples/js/Vre1/Check whether a given value is alpha numeric or not.js
2019-11-15 12:59:38 +01:00

17 lines
342 B
JavaScript

function is_alphaNumeric(str)
{
regexp = /^[A-Za-z0-9]+$/;
if (regexp.test(str))
{
return true;
}
else
{
return false;
}
}
console.log(is_alphaNumeric("37828sad"));
console.log(is_alphaNumeric("3243#$sew"));