A colleague presented me with interesting challenge: An attorney she was working with entered comments into a document as parenthetical phrases. That is to say, the comments were entered ‘inline’, within parentheses and not by using Word’s INSERT COMMENT feature. Having already actioned the comments, she was looking for a simple method to find and remove all the parenthetical text.
Is it possible to search for and delete an unknown string of text, given the first and last characters ?
Advanced Find and Wildcards to the rescue.
So our goal: find an open and close parentheses, including all that stuff in the middle, and replace it with nothing (essentially, deleting it).
Using Advanced Find and wildcards to delete text.
- Press CTRL + F to display the Navigation Pane.
- Click the drop-down to the right of the search icon and select Advanced Find. The Find and Replace dialog appears.
- If necessary, click the More button to display additional options.
- Check the Use Wildcards check-box.
- In the Find What area enter \(*\)
Note: Usually, when conducting a wildcard search, the parenthesis is used to denote an expression. The backslash “\” is used to indicate when a search device (in this case, the parenthesis) is to be taken literally.
- Click Find Next, then click Replace to delete selectively or Replace All to do so en masse.
Note when using wildcards the Find What text is case sensitive.
|Any character||?||s?t finds sat and set|
|Any string of characters||*||s*d finds sad and started|
|The beginning of a word||<||<(inter) finds interesting and intercept, but not splintered|
|The end of a word||>||(in)> finds in and within, but not interesting|
|One of the specified characters||[ ]||w[io]n finds win and won|
|Any single character in this range||[-]||[r-u]ight finds right, sight and tight|
|One or more occurrences of the previous character or expression||@||lo@t finds lot and loot|
Comments and questions are always welcome!