Quantcast
Channel: THWACK: Message List - Network Configuration Manager
Viewing all articles
Browse latest Browse all 8827

Re: If Statement for NCM Compliance

$
0
0

The problem with .*Ethernet is if in the config it says, description foo foo Ethernet, that line will match.  You should try to be as specific as possible when creating regular expressions as you can create match logic that will create memory issues and crash applications that are written poorly.

 

[aA-zZ]+ would actually be the most correct but \S+ is non-whitespace 1 or more.

 

.* is zero or more of any character excluding end line.

 

Lastly, you can get away with some poor regex if you have a complete knowledge of all IOS configuration possibilities, that's a tall order though as what you see in configurations can vary from platform to platform.


Viewing all articles
Browse latest Browse all 8827


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>