Hey all,
I have a regex here:
var NameValidator = {
first_middle_last_with_first_middle : function(txt){
var regex = /^w{1,}\s\w{1}\s\w{1,}\s&W\s\w{1,}\s\w{1}$/
alert(regex.test(txt));
}
}
NameValidator.first_middle_last_with_first_middle('ROGELIO P DIAZ &W CLUADIA L');
})()
It alerts false. Why is the string failing? It should be matching.
Thanks for response