I\'m looking for a simple regular expression to match the string where no repeated characters. Example:
If its a duplicate 3 or more times in a row, this is the fastest way to do it. (no phony demo provided)
^(?:(.)(?!\1{2}))+$
^ (?: ( . ) # (1) (?! \1{2} ) )+ $
You may do negation through negative lookahead.
^(?!.*(\w)\1{3,}).+$
DEMO