Tuesday, May 3, 2016

Microsoft Word: Find and Replace characters within parentheses

This is something I have to occasionally do, and I'm always re-learning from scratch:

Thing (I want to find and replace) with more stuff (different item to find and replace) and other info (the only consistent thing is that these are in parentheses) in-between.
  1. Open the Find-Replace dialog
  2. If necessary, click the More button to display and enable Use wildcards
  3. The ( is a special character, so you must escape it with \ i.e. \(
  4. Use the asterisk * to indicate the anythingness in-between
  5. Terminate with \)
    1. Your search string looks like \(*\)
Problem: How do I replace the contents between parentheses? Haven't figured that out yet. You use parentheses to demarcate items in a search string - (thing)(item)(stuff) in the Find box are represented as \1\2\3 in the Replace box. But (\()(*)(\)) in the Find box just keeps failing on me.

The trick at http://word.mvps.org/FAQs/General/UsingWildcards.htm doesn't quite seem to be the answer. Any ideas?

No comments:

Post a Comment