Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^[^\s]*[a-z][^\s][.{1}][^\s\b]*[a-z][^.\b][^\s\b]$
/
gmDU

Description

Validates domain names. Support https:// or http:// prefix.

Submitted by ._thunderstrike - a year ago