Hi Community
I'm trying to build a block policy for the following configuration
!
line 0/1/0
config line x
config line y
config line z
line 0/1/1 0/1/7
config line x2
config line y2
config line z2
line 0/1/8 0/1/15
config line x
config line y
config line z
line vty 0 5
config blablabla
A block starts at line x/y/z until the next line x/y/z... So the above example has 3 block I want to consider.
my initial idea was to define start and end tag like this:
start: line [0-9]/.* (regexp)
end: line
After a lot of testing I believe that this will result in only two blocks
line 0/1/0
config line x
config line y
config line z
line 0/1/1 0/1/7
config line x2
config line y2
config line z2
line 0/1/8 0/1/15
config line x
config line y
config line z
line vty 0 5
config blablabla
The red lines are a block and the blue lines are a block. The block in the middle is not verified against the policy.
Is this possible? I've tried ^!\s as well as a closing tag, no luck either
any sugestions?
much thanks
Hans