regular expressions
(60 minutes to learn)
Summary
A regular expression is a sequence of characters describing a pattern against which strings can be matched. They are commonly used to search text files for patterns, e.g. as in tools like grep.
Context
-this concept has no prerequisites-
Goals
- Be familiar with regular expression syntax
- Be able to write regular expressions to solve simple problems
Core resources (read/watch one of the following)
-Free-
→ Coursera: Automata
An introductory course on automata and the theory of computation.
-Paid-
→ Automata Theory, Languages, and Computation
An undergraduate textbook on automata and the theory of computation.
- Section 3.1, "Regular expressions," pages 85-92
- Section 3.3, "Applications of regular expressions," pages 109-115
Supplemental resources (the following are optional, but you may find them useful)
-Paid-
→ Introduction to the Theory of Computation
An undergraduate textbook on automata and the theory of computation.
Location:
Section 1.3, subsection "Formal definition of a regular expression," pages 64-66
See also
-No Additional Notes-