in reply to Regular expression
The 1 doesn't do anything. Really
Seems weird, but in perl, just like the trailing "1;" in the end of a "require"'d file, a line consisting of a thingie ( whether it may be a scalar, array, hash, whatever ) is totally valid
So the equivalent of above code is
while( s/(\d)(\d\d\d)(?!d)/$1,$2/ ) { 1; ## do nothing, let the regex go until it no longer matche +s }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Regular expression
by alfie (Pilgrim) on Jun 07, 2001 at 20:41 UTC | |
by lestrrat (Deacon) on Jun 08, 2001 at 00:45 UTC |