in reply to Regex to match a Cisco ACL

It would be easier to tackle this if you could give us some actual lines to work with, rather than the description. If possible some lines that show the various possibilities.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^2: Regex to match a Cisco ACL
by Anonymous Monk on May 22, 2011 at 10:17 UTC

    I totally agree with you, you are right, the descriptions are not too helpful. OK, Here are some sample lines:

    access-list V420_IN extended permit object-group Symantec_Service_Grou +p object-group Symantec_Clients Symantec_Servers (all 3 object groups +) access-list V420_IN extended permit object-group Symantec_Service_Grou +p 10.148.0.0 255.254.0.0 host 10.149.16.40 (One service group and tw +o network addresses) access-list V420_IN extended permit object-group Symantec_Service_Grou +p any any (Source & Destination any) access-list V420_IN extended permit tcp any any range 137 139 (with a +range of TCP ports) access-list V420_IN extended permit tcp any any eq 445 (with a single +service port)

    Of course there are many more, but they are all permutations of different possibilities for the three sections I mentioned above. Hope it makes more sense now