Community Patterns

Community Library Entry

0

Regular Expression
Created·2023-03-10 21:18
Flavor·PCRE2 (PHP)

/
(https:\/\/|http:\/\/).+\..+\/|(http\:\/\/|)localhost(\:(\d+$))
/
gmU
Open regex in editor

Description

Searches the string for valid URLs. Includes HTTP, HTTPS, and localhost with it's port.

Submitted by Evan Wilson