re.py 818 Bytes
Newer Older
1 2
"""Minimal "re" compatibility wrapper"""

3 4 5 6 7 8 9
# If your regexps don't work well under 2.0b1, you can switch
# to the old engine ("pre") down below.
#
# To help us fix any remaining bugs in the new engine, please
# report what went wrong.  You can either use the following web
# page:
#
10
#    http://sourceforge.net/bugs/?group_id=5470
11 12 13 14 15 16 17 18 19 20
#
# or send a mail to SRE's author:
#
#    Fredrik Lundh <effbot@telia.com>
#
# Make sure to include the pattern, the string SRE failed to
# match, and what result you expected.
#
# thanks /F
#
21

22 23
engine = "sre"
# engine = "pre"
24

25
if engine == "sre":
26
    # New unicode-aware engine
27
    from sre import *
28
    from sre import __all__
29
else:
30 31
    # Old 1.5.2 engine.  This one supports 8-bit strings only,
    # and will be removed in 2.0 final.
32
    from pre import *
33
    from pre import __all__