Start Your Engines!Two Kinds of EnginesNew StandardsRegex Engine TypesFrom the Department of Redundancy DepartmentTesting the Engine TypeMatch BasicsAbout the ExamplesRule 1: The Match That Begins Earliest WinsEngine Pieces and PartsRule 2: The Standard Quantifiers Are GreedyRegex-Directed Versus Text-DirectedNFA Engine: Regex-DirectedDFA Engine: Text-DirectedFirst Thoughts: NFA and DFA in ComparisonBacktrackingA Really Crummy AnalogyTwo Important Points on BacktrackingSaved StatesBacktracking and GreedinessMore About Greediness and BacktrackingProblems of GreedinessMulti-Character “Quotes”Using Lazy QuantifiersGreediness and Laziness Always Favor a MatchThe Essence of Greediness, Laziness, and BacktrackingPossessive Quantifiers and Atomic GroupingPossessive Quantifiers, ?+, *+, ++, and {m,n}+The Backtracking of LookaroundIs Alternation Greedy?Taking Advantage of Ordered AlternationNFA, DFA, and POSIX“The Longest-Leftmost”POSIX and the Longest-Leftmost RuleSpeed and EfficiencySummary: NFA and DFA in ComparisonSummary