How to Find Anything in Parentheses Using Word’s Search

You may also like...

9 Responses

  1. Adriano says:

    Hi Dustin,

    Depending on what version of Word you’re using, you could do this another (simpler) way. Since Word is recognizing the open brackets as part of its search expression, you need to type them in with a backslash: \(.

    To find parentheticals, try using this expression:
    \([^\)]*\)

    I don’t have Word installed right now, but that should work. If not, try surrounding it with square brackets.

    Later,
    Adriano

  2. Lisa Hendrix says:

    Adriano’s way confused me, though I suppose it would work. Yours, on the other, Dustin, made perfect sense. Nice fix.

  3. sefcug says:

    I like the way you think Dustin.

    I have used similar methods, as I use different versions of MS Word, OpenOffice.org Writer, and older word processing software that can utilize “find and replace” functions, but use different expressions.

    Substituting a character or group of characters that do not otherwise appear in the document and then deleting them is much easier, at least for me, than figuring out what expression to use with what software.

    I also use “Find next” and “Replace” rather than “Replace all”, so that I know exactly what is being replaced.

  4. Mikko says:

    You should probably write a macro to do the replacing and searching. But I would rather use some other software instead of Word, for example, LyX or Emacs :-)

  5. Bob says:

    Hey, thanks.…I was about to write a simple Java program to accomplish the task before finding your advice.

  6. Tom says:

    No, no, no. That takes way too much work. Adriano was on the right track.

    To search for everything in parenthesis, type this in the search box:

    \(*\)

    In other words, put a slash in front of the parenthesis

    As Dustin noted, the parenthesis have a special meaning when wildcards are turned on. The \ tells Word to ignore that special meaning.

  7. Nick says:

    Thanks, Tom.
    Works perfectly in Word 2003!

  8. Norma Roche says:

    This was great! I needed to find a missing close parenthesis (which I knew about by counting them by doing a search and replace of an open paren with itself and a close paren with itself, and noting that they differed by one). So I did this search and highlighted them, then only had to scroll down and look for a long streak of highlighting. (Note, though, if you close the Search pane or make any other marks on your document, the highlighting disappears.) Thanks!

  9. Sandy says:

    I often need a quick way to remove bracketed material from text. For reasons I can’t explain, this wildcard search –

    \[*\]

    doesn’t work. But if I first convert that end bracket into another character (I like the tilde ~), I can use –

    \[*\~

    and it works fine.