First of all, sorry for the unclear title, it's hard to describe (and to find an existing solution for the same reason).
I use this regex in Javascript, to collect numbers in a string :
/(?:^|[^\d])([\d]+)(?:$|[^\d])/g
Executing it on "5358..2145"
returns 2 matches, where the submatches are "5358"
and "2145"
But if I use it on "5358.2145"
, I receive only 1 match : "5358"
So, I understand it so :
- The first match is found (
"5358."
) so the point goes in the first match - What I want as second match is not preceded with start of string or the point because this point already belongs to the first match
How can I change my pattern to find all numbers separated with 1 non-number character ?