Tags » regex
-
TIL: You can reset the start of a regex in Ruby
The
\K
escape is the “Match-Reset Anchor”, which resets the start of the reported match, and skip any previously consumed characters. -
What does \d match in a regex?
It’s more complicated than I thought.
-
Treat regular expressions as code, not magic
Regexes have a reputation for being unreadable monsters, but it doesn’t have to be that way.