Regular Expressions 101

Community Patterns

isUrl updated regex

0

Regular Expression
ECMAScript (JavaScript)

/
^(?:[a-z][0-9a-z-.+]*:\/\/)?((?:(?:[a-z\u00a1-\uffff0-9_]+-?)*[a-z\u00a1-\uffff0-9_]+)(?:\.(?:[a-z\u00a1-\uffff0-9_]+-?)*[a-z\u00a1-\uffff0-9_]+)*(?:\.(?:[a-z0-9\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/.*)?(?:\?.*)?(?:\#.*)?$
/
gim

Description

Latest isUrl regex

Submitted by anonymous - 7 years ago