Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
(\w*)(\d(?:\/\d)*)(?:\.)?(\d*)?$
"
gm

Description

This regular expression will match on interface names and return grouped data including name, location, sub-interface.

Submitted by Neis - 3 years ago