Front page | perl.beginners |
Postings from November 2009
Re: a match question
Thread Previous
|
Thread Next
From:
Orchid Fairy
Date:
November 24, 2009 22:39
Subject:
Re: a match question
Message ID:
fbe35f750911242239x698e665x2da2b25f8efe10a4@mail.gmail.com
On Wed, Nov 25, 2009 at 11:06 AM, John W. Krahn <jwkrahn@shaw.ca> wrote:
>
> $ perl -le '$_="aXXXb"; print "one word is $1 at $-[0] to $+[0]" while
> /(X*)/g;'
> one word is at 0 to 0
> one word is XXX at 1 to 4
> one word is at 4 to 4
> one word is at 5 to 5
>
Thanks that's so smart~
But I'm still confused since 4 is the end, why still run for the last
step of 5 to 5?
//Fairy
Thread Previous
|
Thread Next