Published August 27th, 2003 by Jim O'Halloran
Writing Maintainable Regexps
ONLamp.com has a handly article on writing regexp’s that a mere motal can understand and maintain.
Regular expressions are hard to write, hard to read, and hard to maintain. Plus, they are often wrong, matching unexpected text and missing valid text. The problem stems from the power and expressiveness of regular expressions. Each metacharacter packs power and nuance, making code impossible to decipher without resorting to mental gymnastics.