Skip to content

Instantly share code, notes, and snippets.

View skwidhubz's full-sized avatar
🦕
let mood = code;

lordradias skwidhubz

🦕
let mood = code;
View GitHub Profile
@skwidhubz
skwidhubz / regex-explanied.md
Last active March 30, 2023 08:08
This tutorial is intended to introduce and explain 'regex' (regular expressions), it's components and uses.

RegexPlained

This tutorial is intended to introduce and explain 'regex' (regular expressions), it's components and uses.

Summary

Regular expressions, or regex, are patterns used to match and manipulate text. There are several components to regex patterns that allow for powerful and flexible matching. Character classes are used to match specific sets of characters, such as digits or letters.

Metacharacters, such as the period and asterisk, represent any character or any number of characters respectively. Anchors, like the caret and dollar sign, are used to match the beginning or end of a line or string. Quantifiers, such as the plus sign and question mark, control the number of times a character or group of characters can appear. Finally, grouping constructs, such as parentheses and square brackets, allow for complex combinations of patterns to be matched.