Regexp Builder is a PHP class that can be used to build regular expressions programmatically.
It provides clearly named methods to add each part of a regexp, such as matching the beginning or end of the text, a range of characters, a portion of text.