Find & Replace [word] with (word)

G

Guest

How can I find and replace the brackets only such as, [anywords] with
(anywords)
I tried [*] with (*) and that didn't work.
 
K

Klaus Linke

"Christina"wrote:
How can I find and replace the brackets only such as,
[anywords] with (anywords)
I tried [*] with (*) and that didn't work.


Hi Christina,

Let's first try to match "[anywords]".
Your expression is close, you only have to "escape" the [square brackets]
with \backslashes, since they have a special use in wildcard searches:

Find what: \[*\]

You want to get rid of the square brackets. In wildcard matches, you can
reuse stuff from "Find what" in "Replace with" if you put it in
(parentheses).
Then you can use \1 in "Replace with" for the matched text in the first
expression in (parentheses), \2 for the second, and so on.

Find what: \[(*)\]
Replace with: (\1)

That should do the trick.
Klaus
 
G

Graham Mayor

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top