Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-11-11 15:42
Flavor·ECMAScript (JavaScript)

/
((http|https?)?(.+?\.?)(retailstore.com)(.+?\.?)?)
/
ig
Open regex in editor

Description

This is meant to match a specific root domain in certain formats. For example, I'm excluding the root domain by itself as that could be what is written in the documentation, but in links, or code, it would usually have a subdomain and protocol attached.

Submitted by Joseph