A family of Microsoft word processing software products for creating web, email, and print documents.
Use Word’s wildcard Find and Replace; no macro is required.
Assuming the pattern is:
<space><UPPERCASE...any characters...>:
and you want to change or remove the text between the space and the colon, do this (Word for Windows):
- Press
Ctrl+Hto open Replace. - Select More and check Use wildcards.
- In Find what, enter:
Explanation (per Word wildcard rules):([ ])([A-Z]@)(:)-
[ ]– a literal space. -
[A-Z]– any uppercase letter. -
@– one or more occurrences of the preceding expression. -
(:)– the colon, captured as a separate group.
-
- In Replace with, enter what is needed. Examples:
- To delete the text between the space and the colon but keep the space and colon:
\1\3\1= the space,\3= the colon. - To replace that text with a fixed word (for example,
X):\1X\3
- To delete the text between the space and the colon but keep the space and colon:
- Click Replace or Replace All.
If on macOS Word, open Advanced Find & Replace, check Use wildcards, and use the same patterns in Find what and Replace with.
References: