Intro
- Regular Expressions = "regex" or "regexp"
 - A quick way of describing a particular pattern of characters in text
 - Allows for extremely effective search and replace
 - Comes from the 
ededitor from UNIX but you'll mostly encounter thegrepprogram 
Knowing regular expressions can mean the difference between solving a problem in 3 steps and solving it in 3,000 steps. When you’re a nerd, you forget that the problems you solve with a couple keystrokes can take other people days of tedious, error-prone work to slog through.
– Cory Doctorow in Here's what ICT should really teach kids: how to do regular expressions

Notes
BRE vs ERE
grepuses so called "basic regular expressions" (BRE) by default.- What we normally consider "regular expressions" are actually "extended regular expressions" (ERE)
 - The main difference is in backslashing the meta characters:
                    
- BRE: 
\?,\+,\{,\} - ERE: 
?,+,{,} 
 - BRE: 
 - EREs can be turned on in 
grepby passing the-Eparameter. - More details here
 
Links
- The origins of grep: Brian Kernighan, one of the forefathers of UNIX discusses how 
grepcame to be, and it makes for a rather interesting story! (If you are in a hurry, here is a 10 minute video.) - RegexOne: interactive tutorial
 - Regex101: playground & IDE for regular expressions.
 - Regexper: visualises regular expressions as "proto programs"
 - Games:
 - There are also some alternatives to 
grep, esp.ripgrep=rg - You can even use regex to search prime numbers. Not so easy for email addresses though.
 
Tips
- Use non-capturing groups, if needed
 - If you are looking through file, use 
find [path] -name [pattern]or evenfind [path] -regex [pattern](typically with-type fjust for files) instead ofgrep