axiak / pyre2

Python wrapper for RE2
BSD 3-Clause "New" or "Revised" License
295 stars 39 forks source link

basic usage doesn't seem to work #24

Closed icarmi closed 9 years ago

icarmi commented 10 years ago

Running re2, this is what I get:

import re2 o = re2.compile(r"test") 1 print o.search("test") None

While a similar run on re gives me:

import re x = re.compile(r"test") print x.search("test") <_sre.SRE_Match object at 0x7f974fb3b1d0>

Two key differences:

  1. compile prints out "1" to the screen, for some reason.
  2. search doesn't find anything.

Am I doing something obviously wrong? I'm running the latest (0.2.20) with google's latest (re2-20140304)

Thanks! Ido

kmike commented 10 years ago

I believe it is fixed in master, but not in pypi package. See https://github.com/axiak/pyre2/issues/17 and https://github.com/axiak/pyre2/issues/11.

icarmi commented 10 years ago

Yup, that fixed it, thanks!

axiak commented 9 years ago

fixed