Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Efficient way to verify scalar contents (updated x3)

by haukex (Bishop)
on Jun 22, 2020 at 07:05 UTC ( #11118347=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $pw_re = qr{ \A (?: .{20,} | (?=.*[a-z]) (?=.*[A-Z])
            (?: .{16,19} | (?=.*[0-9]) (?: .{12,15}
                | (?=.*[\x21-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E]) .{8,11}
        ) ) ) \z }msx;
    
  2. or download this
    use warnings;
    use strict;
    ...
      like 'aaaaaaaaaaaaaaaaaA0-', $pw_re;
      like 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', $pw_re;
    done_testing;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11118347]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2021-03-03 11:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (77 votes). Check out past polls.

    Notices?