Regular Expressions 101

Community Patterns

2.Expression régulier: Test lien siteweb

1

Regular Expression
ECMAScript (JavaScript)

/
^http:\/\/www.+[a-zA-Z0-9]\.[a-z]{2,3}$
/
gim

Description

Regular expression to test the validité of a basic website address having the format.

http://www.anyadress.domain

the domain being 2-3 caracteres

Submitted by Gilles - 8 years ago