Community Patterns

Community Library Entry

0

Regular Expression
Created·2020-06-30 01:09
Flavor·ECMAScript (JavaScript)

/
(([\w\.]+)(\.[^/\n]+)\/?(.*\/?)*)
/
gm
Open regex in editor

Description

Website finder

Author: Bryan Hu

What does this does

This can give you very useful information about the sites this regex extracts. It can extract the main domains of a variety of sites, give you useful information such as suffix, main domain name, and slash-extensions (i dunno what they are called). But remember: all of this in a single regex.

How can I use this

Use this all you want, no credit needed.

Examples of usage

  • Finding links and getting information
  • Extracting all the links on a page
  • To be copied (Yeah, cuz why not?)

Can I leave now?

There's nothing more to read. You can go!

Submitted by Bryan Hu