I think I might be able to help you.
Sumanth Sharma wrote:
that's b'coz $1 is lexically scoped to the first( the only ) parentheses in the reg-exp.
So, $1 is overwritten on each match.
That isn't actually the case. Well it is the case, but the idion you are using does indeed capture *all* matches. The problem is with your match limits:
m/(ab){5,14}/g
They are written outside of the capture. Try instead:
m/((?:ab){5,14})/g
where the first parentheses capture and the second, inner set groups the string 'ab'.
But I'm still not really sure this will behave as you expect.
Best regards,
Damon
--
Damon Allen DAVISON http://www.allolex.net
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>