Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^(@)?(https?:)?(\/\/)?(www\.)?(([a-z0-9\p{L}][a-z0-9\p{L}-\.]{1,61})([a-z0-9\p{L}]\.[a-z0-9\p{L}][a-z\p{L}-])*([a-z0-9\p{L}])+\/)?(#!\/)?([a-z0-9][a-z0-9.]{1,61})([\/|\?].*)*$
/
gmi

Description

unicode, IDN, usual domains

Submitted by anonymous - 8 years ago