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. Or paste a filter you already use and it will be checked for the classic mistakes.

Runs in your browser. Nothing you paste is uploaded.

Paste a whole command from your notes. It is tested against sample output, checked for the classic mistakes and translated for NX-OS.

Build a filter

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.
    [^255]One character that is not a 2 or a 5. It does not mean "not 255". Use a number range.
    One pipeIOS takes one filter per command. A second "| exclude" becomes part of the regex and excludes nothing.
    SpacesSpaces inside the expression count. "a | b" means "a " or " b".
    sectionPrints the whole block when any line inside it matches. The way to search across lines.