3
I have the following obstacle:
var myString = "c/q/1";
var match = myString.match(/c\/q\/([a-zA-Z0-9-].+)/);
However match
returns as null
, already in the following example:
var myString = "c/q/stringdegrandevalor";
var match = myString.match(/c\/q\/([a-zA-Z0-9-].+)/);
match
is returned with the value searched, which leads me to believe that is the size of the string in the numerical expression 1, which is generating this problem, as I could solve it?
Try:
/c\/q\/([a-zA-Z0-9-]+)/
... http://jsbin.com/rafemikuba/edit?js,console,output– NoobSaibot