In LLDB, where tests run with the debug version of Python, we get a series of deprecation warnings because \( escape sequences are treated as part of the string literal rather than an escaped paren for the regexp pattern.
I believe the change preserves the original intent rather than the actual behavior when running with Python 3, but another pair of eyes would be appreciated.
The \+ doesn't need the escape here either, right? While your patch doesn't impact this one, it's another unknown/unnecessary escape at the regex level, similar to the \' we discussed. I'm not a python expert, and I don't know whether it's actually worthwhile to worry about unnecessary escapes at the regex level.
Thanks for the patch, by the way.