rc3.org

Strong opinions, weakly held

Two views of regular expressions

Here’s the famous jwz‘s much-quoted take on regular expressions:

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

Here’s Steve Yegge on regular expressions:

Regexps are obviously quite useful. If you aren’t extremely proficient with regular expressions right now, then you should drop everything and go become proficient with them. I bet I use regular expressions on 350 days out of every year: in my editor, on the command-line, in my code — anywhere that using one would save me time or make my code clearer. Oh, how it hurts to think about all the so-called “programmers” out there who don’t know how to use regexps. Argh. Let’s just drop it.

Less pithy, more correct. (He makes the same recommendation regarding XPath, and he’s correct there as well.)

And yeah, I know that article is old but someone just pointed me at it and it’s interesting and true.

1 Comment

  1. My love for regular expressions knows no bounds: I don’t know how anybody does anything without them. My Excel-fu has gone through the roof now that I’ve discovered MOREFUC.XLL, which provides several regexp functions.

Leave a Reply

Your email address will not be published.

*

© 2024 rc3.org

Theme by Anders NorenUp ↑