in reply to Test RegEx

That's because your regex contains an unmatched (, just as the error message says. Either add an ) where appropriate, or escape the ( so that it doesn't have a special meaning.

See also: perlretut

Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^2: Test RegEx
by Saved (Beadle) on Apr 08, 2010 at 18:08 UTC
    I have counted, added, subtracted ")" with no change in the error. I am trying to test the RegEx: ^\s*password\s+requisite\s+(/lib/security/$ISA/)?pam_cracklib.*lcredit=(0123456789-+

      You can't (try to) use / as the regex delimiter and (an unquoted) / within the regular expression. Use a different regex delimiter, for example !:

      ... if (@RECORD = grep (m!^\s*password\s+requisite\s+(/lib/security/$ISA/) +?pam_cracklib.*lcredit=([0123456789-]+!, @fRecords )) { ...

      Also see perlop on m//

        Error resolved, thanx. Now I just need to get on top of RegEx's
        Thanx, that's likely the problem. I'll try to work throgh with that.