CountZero, it is Spot on!! I ran it on a config file containing around 900 rules. It matched most of it, except few cases which I didn't outline above. I still have to modify it to parse remarks and match them with the appropriate rules. Well that is for my homework...
My previous code used to take almost a minute to parse. This one produced the result instantaneously. Proves to myself that I wasn't wrong in approaching the monks :)
In reply to Re^2: Regex to match a Cisco ACL
by Anonymous Monk
in thread Regex to match a Cisco ACL
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |