I have the following obstacle:
var myString = "c/q/1";
var match = myString.match(/c\/q\/([a-zA-Z0-9-].+)/);
But 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 searched value, which leads me to believe that it is the size of the string in numeric expression 1, which is generating this problem, how could I solve it?