Is it possible to use re2 from Python?

Posted by flow on Stack Overflow See other posts from Stack Overflow or by flow
Published on 2010-03-13T17:51:26Z Indexed on 2010/03/13 17:55 UTC
Read the original article Hit count: 250

Filed under:
|

i just discovered http://code.google.com/p/re2, a promising library that uses a long-neglected way (Thompson NFA) to implement a regular expression engine that can be orders of magnitudes faster than the available engines of awk, Perl, or Python.

so i downloaded the code and did the usual sudo make install thing. however, that action had seemingly done little more than adding /usr/local/include/re2/re2.h to my system. there seemed to be some `*.a file in addition, but then what is it with this *.a extension?

i would like to use re2 from Python (preferrably Python 3.1) and was excited to see files like make_unicode_groups.py in the distro (maybe just used during the build process?). those however were not deployed on my machine.

how can i use re2 from Python?

© Stack Overflow or respective owner

Related posts about python

Related posts about regex