in reply to Regular expression to check for qwerty sequence in a password
#!/usr/bin/perl -l # http://perlmonks.org/?node_id=1173584 use strict; use warnings; my $password ="asdf"; my $sequences = "qwertyuiop\nasdfghjkl\nzxcvbnm"; if( "$password\0$sequences" =~ /(.{3}).*\0.*\1/s ) { print 'no sequences allowed!'; } else { print "password is okay"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Regular expression to check for qwerty sequence in a password
by bradcathey (Prior) on Oct 09, 2016 at 16:23 UTC | |
by tybalt89 (Monsignor) on Oct 09, 2016 at 16:38 UTC |
In Section
Seekers of Perl Wisdom