Select similar phrases in Microsoft Word

2

I need to select and highlight many sentences in which Microsoft Word in which the start word and the end word of the sentence/phrase is the same, but the content in between is different.

How can I achieve this using the find function in word? I want to automate doing this as it should be possible, only thing is I don't know how to achieve this. It would take a very long time for me to manually highlight so many phrases

rzlines

Posted 2011-04-17T17:27:46.017

Reputation: 7 006

Answers

2

Try using regular expressions.

Microsoft has a tutorial here:

Vlueboy

Posted 2011-04-17T17:27:46.017

Reputation: 673

this i already know off but could you write the exact expression? – rzlines – 2011-04-17T17:50:52.400

2

Let me try and figure it out. I don't quite have word available on the PC. It may be something along the lines of (<*>)*\1 in their custom syntax which is not the standard I'm good with

– Vlueboy – 2011-04-17T18:18:03.677

the worry is that all the characters that i'm trying to find are special characters so I'll need to escape them too I guess – rzlines – 2011-04-17T18:24:13.327

2

I tested with my string above, but can't limit to once per line. Special chars can be input or escaped. Multi-highlight searches appear to be impossible without VBA macros like this apparent solution. Either paste the code into a real shell outside Word with real regular expressions (cygwin's bash is useful but huge), or you'll need VBA. Sorry that I couldn't solve the issue.

– Vlueboy – 2011-04-17T20:27:34.660