unmatched parentheses in regex :-(

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Kevin Pfeiffer

unmatched parentheses in regex :-(

Post by Kevin Pfeiffer »

Here is my regex: \(.+\n\) to be replaced by: \1\n

And I get: Unmatched '( or {'

I'm not using POSIX and the docs say the brackets need to be escaped, but it's not working. Why??? (Pleeease help me, it's driving me crazy)

-K
Andreas

Re: unmatched parentheses in regex :-(

Post by Andreas »

it is the \n which causes this.

Use

\(.+\)\n

instead and replace by

\1\n\n
Post Reply