Saved has asked for the wisdom of the Perl Monks concerning the following question:
But get Unmatched ( in regex; marked by <-- HERE in m/^\s*password\s+requisite\s+( <-- HERE / at /home/infosec/bin/RegTest.pl line 10. All help much appreciated, thanx#!/usr/bin/perl #<RegTest.pl> Test a Regular Expression use strict; use warnings; $FNAME="system-auth-ifds"; $fpid = open(XFILE, $FLNAME) or die "Search File Not Found: $!\n"; @fRecords=<FNAME>; close FNAME; $rCount = @fRecords; if (@RECORD = grep (/^\s*password\s+requisite\s+(/lib/security/$ISA/)? +pam_cracklib.*lcredit=([0123456789-]+/, @fRecords )) { print "Yes"; } else { print "No"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Test RegEx
by moritz (Cardinal) on Apr 08, 2010 at 18:00 UTC | |
by Saved (Beadle) on Apr 08, 2010 at 18:08 UTC | |
by Corion (Patriarch) on Apr 08, 2010 at 18:16 UTC | |
by Saved (Beadle) on Apr 08, 2010 at 18:37 UTC | |
by sierpinski (Chaplain) on Apr 08, 2010 at 19:53 UTC | |
by Saved (Beadle) on Apr 08, 2010 at 18:27 UTC | |
|
Re: Test RegEx
by kennethk (Abbot) on Apr 08, 2010 at 18:00 UTC | |
by Saved (Beadle) on Apr 08, 2010 at 18:08 UTC | |
by kennethk (Abbot) on Apr 08, 2010 at 18:12 UTC | |
|
Re: Test RegEx
by planetscape (Chancellor) on Apr 08, 2010 at 20:33 UTC | |
|
Re: Test RegEx
by ww (Archbishop) on Apr 08, 2010 at 20:59 UTC |