On Dec 19, Bram Heyns said:
>For example if I have a string like "aaaa" and I want to match every
>"aa" in there, how should I do this?
Use a look-ahead:
while ($str =~ /(?=pattern)/g) { ... }
so you'd use /(?=aa)/g there.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]