Regular Expressions 101

Community Patterns

Networking Parser - Command (show ip interface brief) - Platform (Cisco Switches/Routers)

0

Regular Expression
Python

r"
(?P<interface>\w+(?:\d/?)+(?:[\.]\d{1,3})?)\s+(?P<ip_address>(?:\w[\.]?)+)\s+(?P<ok>\w+)\s+(?P<method>\w+)\s+(?P<status>(?:\w+\s)?[\w]+)\s+(?P<protocol>\w+)
"
gm

Description

no description available

Submitted by anonymous - 4 years ago