var charString = "Hyderabad
is a beautiful city";
var regExp = new RegExp("beauti");
if (regExp.test(charString.toString()))
{
alert('True')
}
var regExp = new RegExp("beda");
if (regExp.test(charString.toString())) {
alert('True city')
}
else {
alert('false');
}
No comments:
Post a Comment