Replace between ( and )

General discussions about Advanced Find and Replace
Post Reply
zoetericky
Posts: 1
Joined: Thu Feb 16, 2006 11:13 am

Replace between ( and )

Post by zoetericky »

Hi, i have a long text and i want to replace everyting between ( and ), but i cant find how to.

Example:
Lorem ipsum (dolor) sit amet, consectetuer (adipiscing elit. Curabitur) convallis mollis (nunc). --> Lorem ipsum sit amet, consectetuer convallis mollis.

Abacre
Site Admin
Posts: 1223
Joined: Mon Jan 31, 2005 5:32 pm

Post by Abacre »

Hi,

There are two solutions:
1. Use Replace operation with "Insert Between" action.
So on Main window go to Replace tab and select Between as action.
Then put ( into "Text to Find"
and ) into "Ending With"
then put your text into "Replace/Insert by text"

2. Use Batch replace with activated "Use regular expressions".
For your case, for example, you should use
Search for:
\(.*\)
Replace with:
(put your text here)

then if your text between () may take several lines, I think it is not
your case, you should check "Modifier S" on Options window.

So first variant is a simple one, but second solution is more
flexible.
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

Post Reply