“bogus escape error” in regex
Wanting to remove the parenthesis around the final text between parenthesis at the end of book titles, I tried to replace (.*) \((.*)\)$ with \1 \2 and got the ominous warning:“bogus escape error”
Seem python does not like having the laxt regex character escaped.
But I found a simple bodge to get around the problem.
First step, in Character match, replace ) with )X
Then in Regular expression replace (.*) \((.*)\)X$ with \1 \2
Worked a treat.
|