equal
deleted
inserted
replaced
10 from i18n import _ |
10 from i18n import _ |
11 |
11 |
12 def _rematcher(regex): |
12 def _rematcher(regex): |
13 '''compile the regexp with the best available regexp engine and return a |
13 '''compile the regexp with the best available regexp engine and return a |
14 matcher function''' |
14 matcher function''' |
15 m = util.compilere(regex) |
15 m = util.re.compile(regex) |
16 try: |
16 try: |
17 # slightly faster, provided by facebook's re2 bindings |
17 # slightly faster, provided by facebook's re2 bindings |
18 return m.test_match |
18 return m.test_match |
19 except AttributeError: |
19 except AttributeError: |
20 return m.match |
20 return m.match |