View Single Post
 
Old 09-02-2024, 12:17 PM
wardw wardw is offline Windows 11 Office 2021
Advanced Beginner
 
Join Date: Oct 2012
Posts: 65
wardw is on a distinguished road
Default Wildcard search using (<*>) (<*>) finds too many words

I'm trying to use a wildcard find/replace to find strings like "word1 word2 and word3 word2", like "anionic groups and cationic groups". I'd like to delete the second unnecessary word2, so the replaced string would be "anionic and cationic groups". I'm using

Find = (<*>) (<*>) and (<*>) \2
Replace = \1 and \3 \2

But this finds all the text from the insertion point up to the desired Find string. In a long document, this find/replace takes a very long time, for some reason, although the Replace does work. How can I find just the specified pattern without the preceding text?
Reply With Quote