我推荐使用 pcre-5.0
你可以用BCB编译后,用Delphi调用,速度和支持的功能都是非常好的
boost 上面的性能测试,是这么说的:
http://www.boost.org/libs/regex/doc/performance.html
http://www.boost.org/libs/regex/doc/vc71-performance.html
http://www.boost.org/libs/regex/doc/gcc-performance.html
Averages
The following are the average relative scores for all the tests: the perfect regular expression library would score 1, in practice any small number (say less that 4 or 5) is pretty good.
GRETA |GRETA(non-recursive mode)| Boost |Boost + C++ locale| POSIX |PCRE
2.31619 6.14203 2.30668 1.94363 124.752 2.09365
Averages
The following are the average relative scores for all the tests: the perfect regular expression library would score 1, in practice anything less than 2 is pretty good.
Boost |Boost + C++ locale| POSIX |PCRE
1.4503 1.49124 108.372 1.56255
pcre 的得分都是非常优秀的,而且还是用纯C编写的,
很容易在Delphi中调用,
只不过,还需要一点封装
这个也不错, 可以试试
TRegExpr 0.952
http://regexpstudio.com/TRegExpr/TRegExpr.html
TPerlRegEx
http://www.regular-expressions.info/delphi.html
http://www.regular-expressions.info/download/TPerlRegEx.zip