Closed jm7647 closed 4 years ago
Please consider altering your negative regex... I think this does what you want:
>>> from ciscoconfparse import CiscoConfParse
>>> parse = CiscoConfParse(['thing 1', 'thing 3', 'thing 5'])
>>> parse.find_objects(r'^[^ab5]+$') # When excluding characters it helps to match the line
[<IOSCfgLine # 0 'thing 1'>, <IOSCfgLine # 1 'thing 3'>]
By definition Python allows exclusions:
From my experience I can't exclude anything using CiscoConfParse.