in reply to Extended Regex Sequences

Could you explain how you expect the 2nd regex to work? It shouldn't do anything; it will fail if it ever matches a '(' [first match a series of ')', and yet the last character matched from this sequence can't be a '(' - think about it, its impossible]; it will only succeed if 0 '(' are matched, in which case the regex will match a 0-length string, and replace nothing.