Programmer: "We can do that in a regex one-liner!"

Three hours, half of Stack Overflow, and fifty linefeeds later, we have a single working regex. If I wanted to print the "one liner" I would have to order more ink.

But it works.

Until someone throws an unusual UTF-8 character into the regex, and its greedy matching ends up eating the neighborhood pets.

@StevenSaus Sometimes it's better to have a few simple regexes and conditional code than a monstrous regex.
@StevenSaus Most junior coding mistakes I’ve ever seen are hubris about using a regular expression or insisting that real test cases weren’t needed. This post definitely gets to me haha!