Fred Drake | b8f2274 | 2001-09-04 19:10:20 +0000 | [diff] [blame] | 1 | """Minimal "re" compatibility wrapper""" |
| 2 | |
Fredrik Lundh | ef7bae6 | 2000-06-30 22:01:36 +0000 | [diff] [blame] | 3 | # If your regexps don't work well under 2.0b1, you can switch |
| 4 | # to the old engine ("pre") down below. |
| 5 | # |
| 6 | # To help us fix any remaining bugs in the new engine, please |
| 7 | # report what went wrong. You can either use the following web |
| 8 | # page: |
| 9 | # |
Guido van Rossum | 8c74335 | 2000-08-01 20:28:33 +0000 | [diff] [blame] | 10 | # http://sourceforge.net/bugs/?group_id=5470 |
Fredrik Lundh | ef7bae6 | 2000-06-30 22:01:36 +0000 | [diff] [blame] | 11 | # |
| 12 | # or send a mail to SRE's author: |
| 13 | # |
| 14 | # Fredrik Lundh <effbot@telia.com> |
| 15 | # |
| 16 | # Make sure to include the pattern, the string SRE failed to |
| 17 | # match, and what result you expected. |
| 18 | # |
| 19 | # thanks /F |
| 20 | # |
Guido van Rossum | 6ebb387 | 1999-07-09 21:15:32 +0000 | [diff] [blame] | 21 | |
Guido van Rossum | fb06539 | 2000-08-01 21:22:16 +0000 | [diff] [blame] | 22 | engine = "sre" |
| 23 | # engine = "pre" |
Guido van Rossum | 6ebb387 | 1999-07-09 21:15:32 +0000 | [diff] [blame] | 24 | |
Guido van Rossum | 2850d18 | 2000-06-30 16:25:20 +0000 | [diff] [blame] | 25 | if engine == "sre": |
Fredrik Lundh | ef7bae6 | 2000-06-30 22:01:36 +0000 | [diff] [blame] | 26 | # New unicode-aware engine |
Guido van Rossum | 2850d18 | 2000-06-30 16:25:20 +0000 | [diff] [blame] | 27 | from sre import * |
Skip Montanaro | 0de6580 | 2001-02-15 22:15:14 +0000 | [diff] [blame] | 28 | from sre import __all__ |
Guido van Rossum | 2850d18 | 2000-06-30 16:25:20 +0000 | [diff] [blame] | 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 * |
Skip Montanaro | 0de6580 | 2001-02-15 22:15:14 +0000 | [diff] [blame] | 33 | from pre import __all__ |