Animating Regular Expressions With Python and Graphviz
-
Aydin Schwartz
tl;dr: "I find the absolute best way to understand a concept is to visualize it. I’ve built a regex engine using Python and Graphviz that animates what actually goes on when a regex is searching through a body of text. If you want to try out your own examples, the project is publicly available on GitHub."
featured in #318
Regexes Are Cool And Good
-
Hillel Wayne
tl;dr: People hate regexes for 2 reasons: (1) They’re hard to read, so it's hard to tell what a regex does. (2) They’re fragile an a slight change to the input can break it and making them more robust is tough. Hillel argues that the best use cases for regexes is in "interactive use" - when you’re trying to substitute in a single file you have open, or grep a folder. "Readability doesn’t matter because you’re writing a one-off throwaway, and fragility is fine because you’re a human-in-the-loop."
featured in #290
Regex Literals Optimization
-
Esteban Borsani
tl;dr: "Avoids running the regex engine on parts of the input text that cannot possibly ever match the regex." It’s around ~100x faster than before in some benchmarks.
featured in #217