in reply to How to match repeating characters

It's not clear if you mean consecutive repeating or more than 2 repeats anywhere. If the latter, this might work:

c:\test>p1 { printf "password: "; chomp( my $pass = <STDIN> ); redo if $pass =~ m[(.).*\1.*\1]; print "'$pass' Ok"; redo };; password: hello 'hello' Ok password: goodbye 'goodbye' Ok password: xxx password: xaxbxc password:

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"