Regular expressions
Regular expressions (or “regexes”) are sequences of characters used to find matches in text. For example, [a-z]+ matches any text made of lowercase characters a to z, or [0-9]+\.[0-9]+ matches any decimal number like 42.1.
1 article
What does \d match in a regex?
It’s more complicated than I thought.
1 note
You can reset the start of a regex in Ruby
The
\Kescape is the “Match-Reset Anchor”, which resets the start of the reported match, and skip any previously consumed characters.