in reply to Capturing with look-ahead
Capture two chars inside the lookahead and throw in another dot afterwards to advance one character in the string:
$_ = 'blah'; my @matches = /(?=(..))./g; print "@matches\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Capturing with look-ahead
by japhy (Canon) on Mar 04, 2002 at 21:02 UTC | |
by Ido (Hermit) on Mar 04, 2002 at 21:24 UTC | |
by japhy (Canon) on Mar 04, 2002 at 21:53 UTC | |
by Ido (Hermit) on Mar 05, 2002 at 00:44 UTC |