in reply to Re^2: RegEx Headaches
in thread RegEx Headaches
If you want to extract an arbitrary number of digits sandwiched between decimal points, you can grab them all, and then split the result.
Alternatively,/((?:\d+\.)+)/g; split /(?<=\.)/, $1;
[i]n list context, //g returns a list of matched groupings, or if there are no groupings, a list of matches to the whole regexp(see Global matching in perlretut) so you could try
my @res = /(?<=\.)\d+\./g;
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|