Regular expressions

Regular expressions are pretty magical.

When they work.

it's very easy to get led down a road of making more and more complicated expressions that make sense at the time, but never again. The fabled write-once, read-never kind of programming.

And who can forget the infamous saying of Jamie Zawinski:

Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems.

Still, I persevere, determined to keep my expressions as simple as possible while still extracting all I need. Moving up a level to writing a full-blown parser definitely would be overkill.

[Image credit: Mark Norman Francis]