Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^interface (\S+)\n?(?:(?: description (.*)| ip address (\S+) (\S+)| .*)\n?)*
/
gm

Description

This regex fetches interface ID along with its ip address and description if configured otherwise blank

Submitted by anonymous - 5 years ago