Regular Expressions 101

Community Patterns

URL Checker

1

Regular Expression
ECMAScript (JavaScript)

/
(?<Full_URL>(?<PREFIX>(?:http(?:s){0,1}:\/\/){0,1}(?:w{0,3}\.){0,1})(?<WEBPAGE>[a-z0-9\w-]+(?<DOMAIN>\.[a-z\.]+)\/{0,1})(?<SUBPAGES>[a-z0-9\/@\w]+)?)
/
gi

Description

Allows to extract or check if the text includes different URLs, allowing for you to check different kinds of links from the simple ones up to the more complex ones that includes prefix, subdomain, domain, entire website name and subpages.

Submitted by kyunishya - 6 months ago