This says: look ahead to capture the next two words, without advancing pos. Then with that stuff captured, advance pos as far as the first word. However, I don't see much wrong with using @words like you've done in your last example...while ($string =~ / (?=([a-z]+[ ][a-z]+)) [a-z]+ /gx) {
blokhead
In reply to Re: Combinatorial regexing
by blokhead
in thread Combinatorial regexing
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |