Is it possible to use re2 from Python?

Tim Wintle tim.wintle at teamrubber.com
Thu Mar 25 05:34:17 EDT 2010


On Wed, 2010-03-24 at 10:44 -0700, _wolf wrote:
> yes we can! http://github.com/facebook/pyre2

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




More information about the Python-list mailing list