http://qs321.pair.com?node_id=476050


in reply to Negative Lookahead Assertion Problem

Here's how to do it in Perl 6 (I believe):

rx/ \w+ \:\: \w+ :: <!before \s*(> / # # ^^ important
This is basically your example with a small addition. The double colons pointed out above tell the engine not to backtrack once it reaches that point, so it will work this way where it wouldn't in Perl 5.