I'm trying to create a regex pattern a simple regular expression that match for a serial number contains space, hyphen and alphanumeric:
See below:
Serial numbers with these following numbers: 20 4442-23 , 42 4567-23AA , 56 0997
for example:
"if regexp.match (20 4442-23) then button is disabled"
"if regexp.match (42 4567-23AA) then button is disabled"
"if regexp.match (56 0997) then button is disabled"
I tried one of these of them but none seems to work:
(/^[-\sa-zA-Z]+$/,
^[\d]{2}[-\s]{1}[\d]{4}[-\s]{1}[\d]{2}$
< ...
Go to the complete details ...