in reply to Regex Match for 3 repeated word characters

If I understand the question correctly, this would work:
print "bad monkey!" if $pass =~ /(.)\1\1/;
--perlplexer

Replies are listed 'Best First'.
Re: Re: Regex Match for 3 repeated word characters
by hsweet (Pilgrim) on May 08, 2003 at 23:54 UTC
    Let me see if I get it all. You're using a backreference variable to a dot match (.), which is any character. How come \1 and not $1?

    Time flies like an arrow, fruit flies like banannas