Community Patterns

Community Library Entry

1

Regular Expression
Created·2024-10-30 10:28
Flavor·PCRE2 (PHP)

/
(?<!@)\b((http(s)?:\/\/)?((\d+)\.)?[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})(\/[^\s]*)?\b
/
gm
Open regex in editor

Description

Match the web URL, like https://xxx.com or xxx.com, not matching the email or the ip address

Submitted by Hughie