On Tue, Sep 14, 2004 at 02:02:22PM -0400, Aaron Sherman wrote: : Of course, the regex itself can do this: : : qr{(fo*) ({$1 ne 'foo'})}
Er, at the moment bare closures don't care about their return value, so as it currently stands, you'd want something more like: rx/(fo*) {fail if $1 eq 'foo'}/ or rx/(fo*) <($1 ne 'foo')>/ But yes, backtracking is a decent way to handle it. Larry