Regular Expressions 101

Community Patterns

URL domain test

1

Regular Expression
ECMAScript (JavaScript)

/
^((https?)\:\/\/)(([a-z0-9])+\.)*(google\.com)
/
gmi

Description

tests to find if ("google.com") is the domain part of the URL

Submitted by anonymous - 9 years ago