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"; }
In reply to Test RegEx by Saved
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |