Regular Expressions 101

Community Patterns

find any URI/URL with no trailing slash v2

0

Regular Expression
PCRE (PHP <7.3)

/
^((http(s)?):\/\/)?(www.)?([\da-zA-z\_\-]+)\.(com|(|[\da-zA-Z]{2,6}))([\/\w \.\-\#\&\?\%\_]*)?([^\/| |\s])$
/
gmi

Description

updated

Submitted by -oneglory - 9 years ago