Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
Golang

`
https?://w*[[:punct:]]?([^/]+)/?
`
g

Description

Matches subdomain, domain and top level in a field that contains a urls.

https://www.whatever.you.want ---> whatever.you.want

Submitted by anonymous - 8 years ago