Regular Expressions 101

Community Patterns

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 - a month ago