summaryrefslogtreecommitdiffstats
path: root/Mac/Tools/IDE/PyEdit.py
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2001-07-10 19:25:40 (GMT)
committerJust van Rossum <just@letterror.com>2001-07-10 19:25:40 (GMT)
commit3eec7620be596daf4c3f96dbc7fc93afcf639b00 (patch)
tree746bcaaed11384bf9da0cde441eb6c9f7ed3b52b /Mac/Tools/IDE/PyEdit.py
parent353ae5896499d0ec297cff00e3686f4cd88668c3 (diff)
downloadcpython-3eec7620be596daf4c3f96dbc7fc93afcf639b00.zip
cpython-3eec7620be596daf4c3f96dbc7fc93afcf639b00.tar.gz
cpython-3eec7620be596daf4c3f96dbc7fc93afcf639b00.tar.bz2
- fixed some re usage, partly so it'll still work when re uses pre instead
of sre, and partly fixing re -> regex porting oversights - fixed PyFontify.py so it actually *works* again..
Diffstat (limited to 'Mac/Tools/IDE/PyEdit.py')
-rw-r--r--Mac/Tools/IDE/PyEdit.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Mac/Tools/IDE/PyEdit.py b/Mac/Tools/IDE/PyEdit.py
index ac6cc0e..10f583f 100644
--- a/Mac/Tools/IDE/PyEdit.py
+++ b/Mac/Tools/IDE/PyEdit.py
@@ -790,7 +790,7 @@ def _escape(where, what) :
def _makewholewordpattern(word):
# first, escape special regex chars
- for esc in "\\[]().*^+$?":
+ for esc in "\\[]()|.*^+$?":
word = _escape(word, esc)
notwordcharspat = '[^' + _wordchars + ']'
pattern = '(' + word + ')'
@@ -1166,7 +1166,7 @@ def execstring(pytext, globals, locals, filename="<string>", debugging=0,
PyDebugger.stop()
-_identifieRE = re.compile("[A-Za-z_][A-Za-z_0-9]*")
+_identifieRE = re.compile(r"[A-Za-z_][A-Za-z_0-9]*")
def identifieRE_match(str):
match = _identifieRE.match(str)