Value Required ID (\d+)
Value DYNAMIC (D)
Value STATUS (X|R)
Value SLAVE (S)
Value NAME (\S+)
Value List DESCRIPTION (.+?)
Value DEFAULT_NAME (\S+)
Value TYPE (\S+)
Value MTU (\d+|auto)
Value ACTUAL_MTU (\d+)
Value L2MTU (\d+|auto)
Value MAX_L2MTU (\d+)
Value MAC_ADDRESS ([a-zA-Z0-9]{2}(?::[a-zA-Z0-9]{2}){5})
Value LAST_LINK_DOWN_TIME ([a-z]{3}/\d+/\d+\s\d+\:\d+\:\d+|\d+-\d+-\d+\s*\d+:\d+:\d+)
Value LAST_LINK_UP_TIME ([a-z]{3}/\d+/\d+\s\d+\:\d+\:\d+|\d+-\d+-\d+\s*\d+:\d+:\d+)
Value LINK_DOWNS (\d+)
Value VRF (\S+)

Start
  ^\s*Flags:\s+D\s+-\s+dynamic(;|,)\s+X\s+-\s+disabled,\s+R\s+-\s+running(;|,)\s+S\s+-\s+slave(;|,)?\s*(P\s+-\s+passthrough)?\s*$$ -> Interface
  ^\s*$$
  ^. -> Error

Interface
  ^\s*\d+(?:\s+D)?(?:\s*X|R)?(?:\s*S)?\s+ -> Continue.Record
  ^\s*${ID}(?:\s+${DYNAMIC})?(?:\s*${STATUS})?(?:\s*${SLAVE})?\s+name="${NAME}"(?:\s+default-name="${DEFAULT_NAME}")?\s+type="${TYPE}"(\s+mtu=${MTU})?(?:\s+actual-mtu=${ACTUAL_MTU})?(?:\s+l2mtu=${L2MTU})?(?:\s+max-l2mtu=${MAX_L2MTU})?(?:\s+mac-address=${MAC_ADDRESS})?(?:\s+last-link-down-time=${LAST_LINK_DOWN_TIME})?(?:\s+last-link-up-time=${LAST_LINK_UP_TIME})?(?:\s+link-downs=${LINK_DOWNS})?\s*$$
  ^\s*name="${NAME}"(?:\s+default-name="${DEFAULT_NAME}")?\s+type="${TYPE}"(\s+mtu=${MTU})?(?:\s+actual-mtu=${ACTUAL_MTU})?(?:\s+l2mtu=${L2MTU})?(?:\s+max-l2mtu=${MAX_L2MTU})?(?:\s+mac-address=${MAC_ADDRESS})?(?:\s+last-link-down-time=${LAST_LINK_DOWN_TIME})?(?:\s+last-link-up-time=${LAST_LINK_UP_TIME})?(?:\s+link-downs=${LINK_DOWNS})?\s*$$
  ^\s*${ID}+\s*(?:${DYNAMIC})?\s*(?:${STATUS})?\s*(?:${SLAVE})?\s*name="${NAME}"(?:\s*default-name="${DEFAULT_NAME}")?\s*type="${TYPE}"\s*mtu=${MTU}\s*actual-mtu=${ACTUAL_MTU}\s*l2mtu=${L2MTU}\s*(max-l2mtu=${MAX_L2MTU}|vrf=${VRF})?\s*mac-address=${MAC_ADDRESS}\s*ifname="(\S+)"\s*ifindex=(\d+)\s*id=(\d+)(?:\s*last-link-down-time=${LAST_LINK_DOWN_TIME})?(?:\s*last-link-up-time=${LAST_LINK_UP_TIME})?\s*link-downs=${LINK_DOWNS}\s*$$
  ^\s*name="${NAME}"(?:\s*default-name="${DEFAULT_NAME}")?\s*type="${TYPE}"\s*mtu=${MTU}\s*actual-mtu=${ACTUAL_MTU}\s*l2mtu=${L2MTU}\s*(max-l2mtu=${MAX_L2MTU}|vrf=${VRF})?\s*mac-address=${MAC_ADDRESS}\s*ifname="(\S+)"\s*ifindex=(\d+)\s*id=(\d+)(?:\s*last-link-down-time=${LAST_LINK_DOWN_TIME})?(?:\s*last-link-up-time=${LAST_LINK_UP_TIME})?\s*link-downs=${LINK_DOWNS}\s*$$
  ^\s*${ID}(?:\s+${DYNAMIC})?(?:\s*${STATUS})?(?:\s*${SLAVE})?\s+;{3}\s+${DESCRIPTION}\s*$$
  ^\s*$$
  ^\s*${DESCRIPTION}\s*$$
  ^. -> Error
