]> granicus.if.org Git - python/commitdiff
Last minut changes for \B, \S (?). AMK.
authorGuido van Rossum <guido@python.org>
Fri, 15 Aug 1997 15:44:23 +0000 (15:44 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 15 Aug 1997 15:44:23 +0000 (15:44 +0000)
Lib/re.py

index d1df766500a68019fae76c5c2a36f25d68a01ab3..6c24797ffd851be40ac1b5dee6a143ec425d5d70 100644 (file)
--- a/Lib/re.py
+++ b/Lib/re.py
@@ -463,7 +463,7 @@ class WordBound(Instruction):
 class NotWordBound(Instruction):
     name = 'notwordbound'
     def __init__(self):
-       Instruction.__init__(self, chr(18))
+       Instruction.__init__(self, chr(19))
 
 class SyntaxSpec(Instruction):
     name = 'syntaxspec'
@@ -748,7 +748,7 @@ def expand_escape(pattern, index, context=NORMAL):
        elif context == CHARCLASS:
            set = []
            for char in reop.syntax_table.keys():
-               if not reop.syntax_table[char] & reop.word:
+               if not reop.syntax_table[char] & reop.whitespace:
                    set.append(char)
            return SET, set, index + 1
        else: