Regular Expressions 101

Community Patterns

UrlRegex

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^(((https|http):\/\/)?([a-z0-9@:%._\+~#=]{1,256}\.)+[a-z0-9:()]{1,20}+(\/[a-z0-9_():@.]+)*(\/)?((\?|#).*)?|(website_not_available))
/
gm

Description

Test for URL regex

Submitted by anonymous - a month ago (Last modified a month ago)