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:
In reply to Re: How to match repeating characters
by BrowserUk
in thread How to match repeating characters
by Plankton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |