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?
(this message appeared before under
http://stackoverflow.com/questions/2439345/is-it-possible-to-use-re2-from-python
and, even earlier, http://groups.google.com/group/re2-dev/t/59b78327ec3cca0a)
>
> how can i use re2 from Python?
>
Hello Wolf,
There's a recent thread about this on the python-dev list,
Unfortunately it seems to suggest that there are no Python
bindings at present.
Cheers,
Kev
If you would need a re engine with features like unicode rangees,
script, and character properties classes and many others, you may try
the proposed implementation of the re library currently available in
python issue tracker:
http://bugs.python.org/issue2636
I am personally more than satisfied with this development version
sofar, however, as some new feature like unlimited lookarounds etc.
suggest, it is a classic backtracking engine (as opposed to re2, if
you need this very implementation).
hth
vbr
pointers? i searched but didn’t find anything.
>> There's a recent thread about this on the python-dev list,
>
> pointers? i searched but didn’t find anything.
http://mail.python.org/pipermail/python-dev/2010-March/098354.html
as pointed out by http://stackoverflow.com/users/219162/daniel-stutzbach
now gotta go and try it out.
I had made a thin wrapper experiment with here - looks like the version
he's shipped is relatively complete and compatible with the re module
though.
I'll be interested in seeing how well it performs - The wrapper I had
been experimenting with ended up far slower than the re module for
simple expressions - and the fastest codepaths in RE2 seem to be ones
that are incompatible with the API we're used to using in the re module.
Tim