Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
Created·2021-01-11 07:42
Flavor·PCRE (Legacy)

/
^(?P<protocol>[a-z\-]+)?:?(?P<host>\/\/.*\.[^\/]+)$
/
gm
Open regex in editor

Description

Best URL Regex to match URL, This is simple and can match 64K of url regex under 20ms

Regex Matches All Below and more:

Submitted by anonymous