in reply to CISCO Log file pattern matching (again!)

You neglected to add digits to $fqdn, which your hostname contains.

Instead you should use something like [A-Za-z0-9\-\.]+, but if if still find your regexp fails, a basic diagnosis would be to remove components from the regexp until it does work, and then work out why that last one you removed failed to match...

    --k.


Replies are listed 'Best First'.
Re: Re: CISCO Log file pattern matching (again!)
by blue_cowdawg (Monsignor) on Aug 25, 2003 at 14:40 UTC
          You neglected to add digits to $fqdn, which your hostname contains.
    ARRRGH! That explains why the regex worked in my test code but not in the live code.

    Note to self: cut and paste is a good thing... transposing by hand can be a bad thing...

    Thanks for spotting that!


    Peter @ Berghold . Net

    Sieze the cow! Bite the day!

    Nobody expects the Perl inquisition!

    Test the code? We don't need to test no stinkin' code!
    All code posted here is as is where is unless otherwise stated.

    Brewer of Belgian style Ales