Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2019-03-16 20:25
Flavor·PCRE (Legacy)

/
^(?:http(?:s?):\/\/(?:www\.)?)?([A-Za-z0-9_:.-]+)\/?
/
gm
Open regex in editor

Description

The 3rd group of the match will give the domain name

Submitted by anonymous