Testing a string against a RegExp in-build Javascript function.

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under JavaScript category on | Points: 40 | Views : 170
Using Test method,we can achieve
var Reg_Exp = /[a-zA-z]+/;
if(Reg_Exp.test("vishalkumar"))
{
alert('yes');
}
else
{
alert('no');
}

Comments or Responses

Login to post response