I am learning JS regex, so I am thinking about this example string 99s999s99s99
.
Now I want to find all number sequences within this string. I tried the following:
var s = /(\d+)/g;
var a = '99s999s99s99';
s.exec(a);
var s = /(\d+)/;
var a = '99s999s99s99';
s.exec(a);
but both are producing the following output:
[ '99', '99', index: 0, input: '99s999s99s99' ]
How to find all the groups of 9
s?