Hey all,
I have a regex here:
It alerts false. Why is the string failing? It should be matching.Code: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'); })()
Thanks for response


Reply With Quote

Bookmarks