References: Text Processing and Regular Expressions¶
-
Regular Expression — Wikipedia. https://en.wikipedia.org/wiki/Regular_expression Covers the history, theory, and syntax of regular expressions across programming languages, explaining how pattern-matching engines work — foundational background for understanding what Python's
remodule is doing under the hood. -
String Searching Algorithm — Wikipedia. https://en.wikipedia.org/wiki/String-searching_algorithm Explains how computers efficiently scan text for patterns, giving students conceptual grounding for why
re.search()andre.findall()are faster than manually looping through characters. -
Finite-State Machine — Wikipedia. https://en.wikipedia.org/wiki/Finite-state_machine Describes the state-machine model that regex engines use internally to match character classes and quantifiers, helping students visualize how a pattern like
\d+steps through input text one character at a time. -
Automate the Boring Stuff with Python by Al Sweigart (No Starch Press; free online at automatetheboringstuff.com). Chapter 7 of this book is devoted entirely to regular expressions in Python, walking through
re.search,re.findall,re.sub, groups, and character classes with practical, real-world examples perfectly suited to this chapter's topics. -
Python Crash Course by Eric Matthes (No Starch Press). Provides clear, beginner-friendly coverage of Python's string-handling capabilities and the
remodule, with exercises that reinforce pattern matching and text transformation concepts introduced in this chapter. -
Python
reModule — Official Documentation https://docs.python.org/3/library/re.html The authoritative reference for every function, flag, and special sequence in Python'sremodule, including full syntax for character classes, quantifiers, anchors, and compiled pattern objects used throughout this chapter. -
Regular Expressions in Python — Real Python https://realpython.com/regex-python/ A thorough, step-by-step tutorial covering
re.search,re.findall,re.sub, groups, and lookaheads with annotated examples and interactive exercises ideal for students learning regex for the first time. -
Python RegEx — W3Schools https://www.w3schools.com/python/python_regex.asp Offers a quick-reference page for Python's
remodule with runnable code snippets for each major function and a concise metacharacter table — great for students who want a cheat-sheet alongside this chapter. -
Python Regular Expressions — Programiz https://www.programiz.com/python-programming/regex Presents regular expressions with clear diagrams and beginner-friendly explanations of quantifiers, character classes, and the difference between
re.searchandre.match, directly supporting the concepts taught in this chapter. -
Python Regular Expression Tutorial — GeeksforGeeks https://www.geeksforgeeks.org/regular-expression-python-examples/ Provides numerous worked examples of
re.search,re.findall,re.split, andre.subwith annotated output, offering students extra practice problems and pattern-matching walkthroughs that reinforce this chapter's exercises.