- 论坛徽章:
- 0
|
本帖最后由 ccporxy 于 2011-06-23 16:56 编辑
建议你看一下 pcre
PCRE - Perl-compatible regular expressions
The PCRE library is a set of functions that implement regular expres-
sion pattern matching using the same syntax and semantics as Perl, with
just a few differences. Some features that appeared in Python and PCRE
before they appeared in Perl are also available using the Python syn-
tax, there is some support for one or two .NET and Oniguruma syntax
items, and there is an option for requesting some minor changes that
give better JavaScript compatibility.
实际上python/perl/pcre他们用的表达式引擎都是一个,只不过自己添加了一下特性
或者查看Python源码 pythoncore/Modules/_sre 查看,sre仅仅是个引擎,封装还是要靠自己可以参考python实现 |
|