[thelist] Escaping Parenthesis in RegExp

Martin Kuplens-Ewart martin at takingitglobal.org
Sat Mar 9 14:48:01 CST 2002


> If I want to change "(123)" to "Number:123", the RegExp...
>
> Find: ^(^(???^)^)
> Replace: Number:^1

I can only speak in terms of php/perl regexps... But the syntax there
would be:

Find: "/\((\d{3,})\)/"
Replace: "Number: $1" or "Number: \\1".

This will match three + digits and replace them with the string + the
result... Get rid of the , if you want just three matched.

Hth...

-m





More information about the thelist mailing list