Regular Expressions 101

Community Patterns

1...456

URL Matcher

0

Regular Expression
PCRE (PHP <7.3)

/
^(https?:\/\/)?.+\.[^\/]{2,25}.*$
/

Description

Matches all valid URLs. Does not match things such as mailto:someone@example.com and http://a.b/.

Submitted by StellarDoor5319 - 7 years ago