Regular Expressions Inside Out
summary
Shows how Ruby's regex engine actually works and what was built: a C-based matcher that handles Unicode property support and diacritic-aware substitutions, a compression of property tables into equivalence classes (3,747 classes found) and bitmask vectors, and a compact dataset on the order of ~250 KB data. Results include microbenchmarks with >100× speedup for some operations and a 2× memory reduction for property checks, plus examples of huge regexes and context-sensitive substitutions that the implementation supports.
AI-written summary · about
chapters (5)
- 0:00Introduction
- 3:59Smallest regex dialect
- 8:12Regex practical uses
- 19:16Unicode property support
- 36:50Conclusion and Q&A
related talks
38mParsing Expressions in Ruby
38mSomething Interesting
30m(Re)make Regexp in Ruby: Democratizing internals for the JIT
24mJust-in-Time Compiling Ruby Regexps on TruffleRuby
31mService Denied! Understanding How Regex DoS Attacks Work
43mGrammars, Parsers, and Interpreters, In Ruby
36ms/regex/DSLs/: What Regex Teaches Us About DSL Design
30mRuby Techniques by Example
