in reply to Combinatorial regexing
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
|
|---|