That reads the whole desired capture as a lookahead, then consumes the one char.while ($str =~ /(?=(..{$len}))./g) { print pos, "$1\n"; }
In reply to Re: Capture Lookahead
by Roy Johnson
in thread Capture Lookahead
by Anonymous Monk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |