Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^((http|https)\:\/\/|)([\w]+\.)+\w+($|[\w\/\.]+$|[\w\/\.]+\?[\w\=\&\.]+$)
/
mg

Description

validate a url with or without query string and scheme

Submitted by Ganey - 8 years ago