M
Mike Harrison
I'm trying to write a regexp that will return an array of matches
which follow a certain prefix pattern.
For example, running the regexp on this string:
"PREFIX1 other text PREFIX3765 more text12345 PREFIX999 blah blah
blah"
should return an array of ["1", "3765", "999"], ie. every number that
follows PREFIX, but not any other numbers in the string.
/PREFIX\d+/g will give ["PREFIX1", "PREFIX3765", "PREFIX999"], but I
want PREFIX to be matched but not returned in the results.
Is this possible?
which follow a certain prefix pattern.
For example, running the regexp on this string:
"PREFIX1 other text PREFIX3765 more text12345 PREFIX999 blah blah
blah"
should return an array of ["1", "3765", "999"], ie. every number that
follows PREFIX, but not any other numbers in the string.
/PREFIX\d+/g will give ["PREFIX1", "PREFIX3765", "PREFIX999"], but I
want PREFIX to be matched but not returned in the results.
Is this possible?