in reply to Why does this simple grouping regex not match?

(?= ...) is not a "simple grouping", but a look-ahead (ie it looks for the presence of the regex within the group, but doesn't consume any characters).

Use (?: ... ) for just grouping.

(Update: fixed markup)

Replies are listed 'Best First'.
Re^2: Why does this simple grouping regex not match?
by december (Pilgrim) on Feb 28, 2011 at 13:59 UTC

    I'm an idiot. It's a typo, I meant to use a colon in my code. I just kept on copying the same typo.

    Sorry folks!

      a healthy colon is vital to good health and vitality

        ... while equality is overrated? ;)