Bram Heyns wrote:
> 
> I have a rather simple question, but I can't figure it out!
> For example if I have a string like "aaaa" and I want to match
> every "aa" in there, how should I do this?
> So I want a match on position 0-1,1-2,2-3.
> If I use if(/aa/g){} statement, it only finds one, and if I
> use while(/aa/g){} then it only finds 2 ! How can I find all
> of them, even if there are more a's?
> Who can help me out?

$_ = q(aaaa);
push @array, $1.$2 while /(a(?=(a)))/g;
print "@array\n";


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to