Junos CLI Regex Requirements – Comprehensive Guide

clijuniper-junos

Hi I have seen someone do this a while back but for the life of me cant figure out the quick way to match on multiple strings easily.

objective is to display any lines of config that matches either abc or xyz

e.g show conf | match 'abc||xyz' ( <–this line obviously doesn't work in Junos )

Best Answer

It's just slightly different syntax, if you're trying to match lines containing specific strings, you'd use:

show configuration | match "abc|xyz"

Also, here's the documentation in case you want to get fancier: JUNOS Command Regex

Related Topic