Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-05-05 14:46
Flavor·PCRE2 (PHP)

/
((https?:\/\/)|(\/)|(..\/))(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?
/
gm
Open regex in editor

Description

Check URL starts with HTTP/HTTPS and has content after (e.g. https://www.test.com)

Submitted by anonymous