I know that s = r'x\nx'
means 'x' followed by a literal '\' followed by an 'n' (the '\n' is not a carriage return). s = r'x\tx' means 'x' followed by a literal '\' followed by an 't' (the '\t' is not a tab). But, boundries seem to work differently. s = re.sub(r'\bxxx\b', 'yyy', s) Is *not* going to look for a literal '\' followed by 'b' So I am confused about when escapes work within raw strings, and when do escapes not work within raw strings. -- http://mail.python.org/mailman/listinfo/python-list