View Single Post
  #1   Report Post  
Dave Gaines Dave Gaines is offline
Junior Member
 
Posts: 0
Default Finding words consisting only of repeated characters

Hi,

I have a technical editing macro that identifies and fixes various glitches in technical reports. I'd like to highlight instances of repeated characters, where authors have entered repeated characters to remind themselves to fill in the specifics later.

For example, "The details are provided in Figure xxx." or "The system weighs yyy lb."

It's typical that authors use xx, yy, or zz, so have already addressed those (see below), but would like to be able to find all instances of words consisting of only repeated characters (aaaa, bbbb, ccc, dddddd, etc) with a single search pattern.

For xs, yx, and zs, I already have the following, highlighting each replacement in yellow:

FindText:="([xX]@)", ReplacementText:="\1"
FindText:="([yY]@)", ReplacementText:="\1"
FindText:="([zZ]@)", ReplacementText:="\1"

Thanks in advance for your help!