Note that your example is not entirely sensible, though. The expression you give must begin with whitespace, so of course it doesn't begin cat. You have to remember that the lookahead is zero-width, so after it, you're in the same position in the string as before it. Perhaps something like