Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
Created·2015-11-26 18:33
Flavor·ECMAScript (JavaScript)

/
^[a-zA-Z0-9-\_]+\.[a-zA-Z]+?$
/
i
Open regex in editor

Description

For testing domain with TLD

regExp.test("google.com") => true regExp.test("mad.engineering") => true

Submitted by Sergio de la Garza