in reply to all matches
This is better written as a while loop.
while ( /($regex)/gx ) { push @substrings, { match => $1, pos => ( pos() - length $1 ), length => length $1 }; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: all matches
by oz (Novice) on Mar 25, 2004 at 06:54 UTC | |
by diotalevi (Canon) on Mar 25, 2004 at 13:25 UTC | |
by oz (Novice) on Mar 25, 2004 at 21:36 UTC | |
by diotalevi (Canon) on Mar 26, 2004 at 15:01 UTC | |
by oz (Novice) on Mar 27, 2004 at 09:52 UTC |