Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2023-01-17 10:12
Flavor·PCRE2 (PHP)

/
(\\\\([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\\[-a-zA-Z_ 0-9]+\\)(?:[-a-zA-Z_ 0-9\.]+\\)*
/
gm
Open regex in editor

Description

Matches a full UNC path, capturing the IP address, share, and full path.

Submitted by Harvey Nash