Remember not too long ago I had to confess my regular expressions deficiencies to you, the dear reader, regarding an overly verbose regular expression I needlessly crafted, not realizing the greedy nature of the RegEx rendered part of it completely unnecessary?
It happened again.
This time it happened to me with a regular expression that I’ve used many times before. It has to do with my blog posting shortcut(s) and how I handle parsing markdown footnotes in iA Writer documents.
Here’s the regular expression I was using to find footnotes in my iA Writer texts:
My thinking when I wrote it is that it would find anything starting with [^, followed by one or more of any character, and ending in ]. Which it did, and it usually did it the way I expected it to. But then one day I typed the following paragraph: …