Skip to main content

Regular expressions

warning: Creating default object from empty value in /var/www/venutip.com/public_html/modules/taxonomy/taxonomy.pages.inc on line 33.
Posts dealing with regex

The Curious Case of .*

About a month ago, I tweeted what I thought was some pithy advice on the use of .* in regular expressions:

#regex tip of the day: never, _ever_ use .* unless you are forced to do so in a #24-style 
kidnap situation. And even then, think twice.

Funny and topical! But as it turns out, I spoke too soon. Early in Chapter 5 of the superlative Mastering Regular Expressions, the author (Jeffrey Friedl) demonstrates how the judicious use of .* can actually help you to write some very efficient regular expressions.

Syndicate content