clifford.network / toolbox

free tool

CLI Filter Builder

Pull exactly the lines you need out of Cisco show output. Pick a recipe or build your own filter, test it against real output, and copy the IOS, IOS XE or NX-OS version. Number ranges, whole-word matches and "counter not zero" are written for you.

Runs in your browser. Nothing you paste is uploaded.

IOS / XE
NX-OS

Test it

Result, highlighted lines are kept

    Cisco regex on one card

    _A space, comma, bracket, or the start or end of the line. Not an underscore.
    ^ $Start and end of the line. ^_ matches a line that starts with a space.
    .Any one character, including a real underscore.
    [1-9][0-9]*Any number that is not zero. The trick behind the "not zero" match.
    a|bEither. IOS takes one filter per command, so put every alternative in one expression.
    ( )Group alternatives: Gi7/(29|3[0-9])_ is ports 29 to 39.
    Ctrl+V ?Type Ctrl+V before ? or the CLI shows help instead.
    CaseFilters are case-sensitive. On NX-OS, egrep -i ignores case.