Skip to content

Instantly share code, notes, and snippets.

View Cleffy's full-sized avatar

Cleffy

  • San Diego, CA
View GitHub Profile
@Cleffy
Cleffy / MatchURL_RegEx_Tutorial.md
Last active October 18, 2023 01:03
Tutorial: Breaking down a matching URL regex

Tutorial: Matching a URL regex

This tutorial explains how to use a regex to match a url.

Summary

This breaks down the regular expression(regex) that matches a URL.
Refer to the reference below on what the various operators mean.
Here is a breakdown of the matching URL regex:

/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/