was curious how you all are configuring your regex for acl entires.
for example an acl can look like this
access-list 1 permit 1.1.1.1
access-list 1 permit 2.2.2.0 255.255.255.0
access-list 1 remark THIS IS A COMMENT
access-list 1 remark ANOTHER LINE OF COMMENT
access-list 1 permit 3.3.3.3 log
access-list 1 deny any log
my problem is sometimes the "remark" lines are all over the place, sometimes 1 or 2 remarks, depending on what version of IOS it's running.
I tried various permutations of
access-list 1 permit 1.1.1.1
(.*remark.*\n)*?
access-list 1 permit 2.2.2.0 255.255.255.0
(.*remark.*\n)*?
access-list 1 permit 3.3.3.3 log
(.*remark.*\n)*?
access-list 1 deny any log
but doesn't seem to be working. shouldn't the line "(.*remark.*\n)*?" match any amount of lines (0-infinity) with remark?
is there a better way to manage ACL's? because this would fail if the ACL is out of place (2.2.2.0 is before 1.1.1.1) but still would be a valid acl