Skip to content

Instantly share code, notes, and snippets.

@ttrulock1
ttrulock1 / 17 Regex Tutorial
Last active January 4, 2022 02:09
a tutorial explaining a specific regex
# REGEX TUTORIAL
## REGEX SUMMARY
REGEX is at its root, string pattern matching.
To extropolate, imagine having somebody to type in their phone number. There are number of different ways that this could be expressed varying from person to person to country to country, such as using parenthesis, etc. But if you want to store these numbers, they need to consistantly follow a similar pattern. REGEX is about following a pattern, and if you have a phone number, REGEX could test whether it was a valid phone number or not. Validation is a common use of regular expressions.
Regular expression allows you to look at strings and only a string. And regular expressions also allow you to setup a pattern then test that pattern against a string input.
Commonly REGEX is used for validating user input and data mining.