Community Patterns

Community Library Entry

1

Regular Expression
Created·2015-11-12 15:09
Flavor·PCRE (Legacy)

/
https?:\/\/(?:www\.)?([-a-zA-Z0-9@:%._\+~#=]{2,256})(\.[a-z]{2,6}\b)*(\/[\/\d\w\.-]*)*(?:[\?])*(.+)*
/
gi
Open regex in editor

Description

This regex is a mashup that strips protocol, domain and URI into seperate capture groups.

Submitted by Robert Kozora