in reply to negative lookaheads doing my 'ead in

I think the regex should be:
/^\s*(?!for all)(\w+)\s*:\s*(\w+)\s*(?!.*<=)/i
the negative lookahead looks for the thing immediately following. It can still match if it backs off a couple of characters, unless you put in the .*.

It seems to work anyway (ie it doesn't match now)

I hope that was what you wanted (I'm confused now!)

Jasper