in reply to Juniper firewall parser

Better would be to attach some actual lines of example Juniper config file output and your attempt at parsing it in Perl. Update: I guess that it could be that "Sample firewall configuration file " is actually some real file, if so then what do you want to do with it?

Replies are listed 'Best First'.
Re^2: Juniper firewall parser
by perl_lover (Chaplain) on May 24, 2010 at 15:25 UTC
    I want to parse and extract filter and term information. filter definition can have multiple term definition in it. Inside term <term-name> { .* }, you will have multiple configuration like source-address { }. I want to extract all those information. It is difficult to parse these through RegEx as all the fields inside the term are optional and can occur in any order
      please show at least an output from your input.
      I've never heard of juniper firewall, and I don't recognize the format. You should ask the makers of juniper for a format specification and/or a parser.