I'd like to extract the numbers from the following string via javascript/jquery:
"ch2sl4"
problem is that the string could also look like this:
"ch10sl4"
or this
"ch2sl10"
I'd like to store the 2 numbers in 2 variables.
Is there any way to use match
so it extracts the numbers before and after "sl"
? Would match
even be the correct function to do the extraction?
Thx
See Question&Answers more detail:os