For many programmers, writing regular expressions is a black art. They stick to the features they know and hope for the best. Tony Stubblebine,author of Regular Expression Pocket Reference, says programmers can avoid a lot of trial and error by adopting these five habits for regular expression development. The code examples in this article use Perl, PHP, and Python, but the advice Tony espouses is applicable to nearly any regex implementation.
Tony Stubblebine, O’Reilly ONLamp.com