Regular Expressions 101

Community Patterns

1...34567...884

Basic UNC path validation

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^((http|https):)?(\\|\/)\3\S+\3\S+$
/
gm

Description

Simple UNC path validation. Both *nix and windows style.

Submitted by JoostAB - 3 months ago