Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(([a-zA-Z]+:\/\/)*(([a-zA-Z0-9\-]+\.)+([a-zA-Z]{2}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel|local|internal|uk|ac|as|br|co|us|info|biz|pdf|jpg|png|mil))(:[0-9]{1,5})*(\/[a-zA-Z0-9%=_\-\.<~]+)*(\/([:a-zA-Z%=0-9_\-\.#]*)(\?[a-zA-Z0-9+_,\-\._?<%=&amp;#:]*)?)*(#[a-zA-Z0-9!“@$&'()*+,.=\-_%~#:<@?]*)*)(\s+|$)
/
g

Description

no description available

Submitted by anonymous - 7 years ago