Is there a way to search for repeated characters, without specifying which character?

General comments and questions. Technical support.
Post Reply
SilverCookieDust
Posts: 4
Joined: Fri Jan 28, 2022 9:25 pm

Is there a way to search for repeated characters, without specifying which character?

Post by SilverCookieDust »

Apologies: I don't think the subject is very clear, but I don't know how else to succintly word it, so I'll explain here.

I want to search for any occurences of three or more characters that are the same -- e.g. "ooo", "xxx", etc -- but obviously I'd rather not to do it 26 times for each letter of the alphabet. Is there a wildcard expression that will allow me to do this? I do know how to use {n,m}, it's just getting the preceding wildcard that I'm stuck on.
Robert
Posts: 1887
Joined: Fri Aug 15, 2003 8:27 pm

Re: Is there a way to search for repeated characters, without specifying which character?

Post by Robert »

Try the following wildcard Find:

Code: Select all

(^$)\1{2,}
SilverCookieDust
Posts: 4
Joined: Fri Jan 28, 2022 9:25 pm

Re: Is there a way to search for repeated characters, without specifying which character?

Post by SilverCookieDust »

That works perfectly, thank you!
Post Reply