/Regex

Regex How-To: Quantifiers, Pattern Collections, And Word Boundaries

- Bob Reselman tl;dr: "You learned to use quantifiers to declare a range of character occurrences to match. Also, you learned that pattern collections enable you to declare character classes that match characters in a generic manner. Groups execute matches that declare a particular set of characters. Word boundaries allow you to make matches by working within the boundaries of space characters and punctuation marks."

featured in #353


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


The Regex [,-.]

- Paul Boyd tl;dr: "I can’t tell if the author was being clever or if it was a particularly lucky typo. Either way, I will continue putting - at the beginning: [-,.]. But if you feel the need to send someone down a rabbit trail [,-.] is an option for you." Paul discusses how arrived at this conclusion.

featured in #316


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


Online Regex Tester

- Firas Dib tl;dr: Free PCRE-based regular expression debugger with real time explanation, error detection and highlighting.

featured in #150