Using Regular Expressions
=========================

Commands
========
    - All commands that take a node name

Usage
=====
Simple regular expressions can be used when querying by node name.

    cumulus@torc-21:mgmt-vrf:~$ netq 'spine-*' show interfaces swp1
    Matching interface records are:
    Node             Interface        Type     State Details                     Last Changed
    ---------------- ---------------- -------- ----- --------------------------- --------------
    spine-1          swp1             swp      up    LLDP: noc-pr:swp12,         5m ago
                                                     MTU: 9152
    spine-2          swp1             swp      up    LLDP: noc-pr:swp13,         5m ago
                                                     MTU: 9152
    spine-3          swp1             swp      up    LLDP: noc-pr:swp14,         5m ago
                                                     MTU: 9152

    cumulus@torc-21:mgmt-vrf:~$ netq 'tor[-1-2]*' show interfaces
    Matching interface records are:
    Node             Interface        Type     State Details                     Last Changed
    ---------------- ---------------- -------- ----- --------------------------- --------------
    tor-1            VlanA-1.104      vlan     up    MTU:9152                    13h ago
    tor-2            VlanA-1.104      vlan     up    MTU:9152                    13h ago
    cumulus@torc-21:mgmt-vrf:~$


The regular expressions that are usable are:
    - '*': match zero or more of any char. So torc* matches torc-11, torc etc.
    - '?': match exactly zero or one char
    - [0-9]: match exactly one char that is a number between 0-9
    - [a-zA-Z]: match exactly one char that is a letter between a-z or A-Z
    - [-1-2]*: match zero or more chars that are either -, 1 or 2

The regular expression syntax between python and the backend DB are different,
which leads to supporting more than simple regular expressions difficult at
this point.

To avoid the shell from completing the regexps, enclose the regexps in single-quotes.

