A Regular Expression or Regex is a sequence of characters specifying a search pattern in text. In other words, it is a shorthand for returning specific criterion in any programming language.
- looking for a patterned-string in your code (like a phone or card number)
- replacing an existing pattern with another
- referencing string-based algortithms
- input validation