Fredrik Lundh | ef7bae6 | 2000-06-30 22:01:36 +0000 | [diff] [blame] | 1 | # |
| 2 | # Minimal "re" compatibility wrapper |
| 3 | # |
| 4 | # If your regexps don't work well under 2.0b1, you can switch |
| 5 | # to the old engine ("pre") down below. |
| 6 | # |
| 7 | # To help us fix any remaining bugs in the new engine, please |
| 8 | # report what went wrong. You can either use the following web |
| 9 | # page: |
| 10 | # |
| 11 | # http://www.python.org/search/search_bugs.html |
| 12 | # |
| 13 | # or send a mail to SRE's author: |
| 14 | # |
| 15 | # Fredrik Lundh <effbot@telia.com> |
| 16 | # |
| 17 | # Make sure to include the pattern, the string SRE failed to |
| 18 | # match, and what result you expected. |
| 19 | # |
| 20 | # thanks /F |
| 21 | # |
Guido van Rossum | 6ebb387 | 1999-07-09 21:15:32 +0000 | [diff] [blame] | 22 | |
Guido van Rossum | 2850d18 | 2000-06-30 16:25:20 +0000 | [diff] [blame] | 23 | engine = "sre" |
Fredrik Lundh | ef7bae6 | 2000-06-30 22:01:36 +0000 | [diff] [blame] | 24 | # engine = "pre" |
Guido van Rossum | 6ebb387 | 1999-07-09 21:15:32 +0000 | [diff] [blame] | 25 | |
Guido van Rossum | 2850d18 | 2000-06-30 16:25:20 +0000 | [diff] [blame] | 26 | if engine == "sre": |
Fredrik Lundh | ef7bae6 | 2000-06-30 22:01:36 +0000 | [diff] [blame] | 27 | # New unicode-aware engine |
Guido van Rossum | 2850d18 | 2000-06-30 16:25:20 +0000 | [diff] [blame] | 28 | from sre import * |
| 29 | else: |
Fredrik Lundh | ef7bae6 | 2000-06-30 22:01:36 +0000 | [diff] [blame] | 30 | # Old 1.5.2 engine. This one supports 8-bit strings only, |
| 31 | # and will be removed in 2.0 final. |
Guido van Rossum | 2850d18 | 2000-06-30 16:25:20 +0000 | [diff] [blame] | 32 | from pre import * |