Skip to content

Instantly share code, notes, and snippets.

@dirie93
dirie93 / gist_markdown_examples.md
Created August 17, 2023 16:55 — forked from ww9/gist_markdown_examples.md
Gist markdown examples

Gist markdown examples

A collection of Markdown code and tricks that were tested to work in Gist.

This and all public gists in https://gist.github.com/ww9 are Public Domain. Do whatever you want with it including , no need to credit me.

Todo

  • Reformat this whole document and assimilate these:
@dirie93
dirie93 / regextut.md
Last active August 17, 2023 17:26
A Tutorial on Regex

Regex tutorial

Regex, which is an abbreviation for a regular expression, is a dynamic sequence of characters in the form of a text string. Regex is important in code because it allows you to search for and identify patterns in text; making it easy to do things like validate email addresses, extract data from strings or even replace text.

Summary

The upcoming tutorial will break down the provided regex pattern for matching URLs:

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