Skip to content

Instantly share code, notes, and snippets.

@moritz
Created June 1, 2017 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moritz/471edf9f7161971ba0b5365d3526bb8e to your computer and use it in GitHub Desktop.
Save moritz/471edf9f7161971ba0b5365d3526bb8e to your computer and use it in GitHub Desktop.
Perl 6 Regex treatise

What are Regexes and Grammars

Use Cases

Searching

Validation

Parsing

Perl 6 Regexes vs. Other Regexes

Reusability

Composability

Elements of Simple Regexes

Literals

Meta Characters vs. Literals

Anchors

Pre-Defined Character Classes

User-Defined Character Classes

Quantifiers

Alternatives

AND-Matches

Groups

Using Regexes

Smart-Matching

Comb and Split

Extracting Data

Positional Captures

Named Captures

The Match Object

Nesting of Captures

Extracting Data with $/.ast

Reusability and Composability

Named Regexes

Grammars

Regexes, Token, Rules, Whitespace

Regex Mechanics

Regex Control Flow

Backtracking

What is Backtracking, how does it work?

Why would you want to not have backtracking?

Backtracking Control

Greedy and Frugal Matches

Longest Token Matching

Advanced Regex Features

Modifiers

Zero-Width Assertions

Look-Ahead and Look-Behind

Search and Replace

Parsing with Grammars

Generating Good Parse Errors

Assertions and Parser Location

Parser Combinator and FAILGOAL

Unicode

Unicode Properties

Graphemes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment