in reply to Re^2: approximate regular expression
in thread approximate regular expression

Unless you write your regular expression engine, and use the plugin system to use it, regular expressions are really the wrong way to attack this.