in reply to Why is while(m//g){} so much slower than s///eg and what can I do about it?
This may help you in your efforts.$prematch = substr($string, 0, $-[0]); $match = substr($string, $-[0], $+[0] - $-[0]); $postmatch = substr($string, $+[0]); $paren_1 = substr($string, $-[1], $+[1] - $-[1]); # ...
|
|---|