On 12 Jun 2008 12:32:13 GMT, Duncan Booth <[EMAIL PROTECTED]> wrote: >David C. Ullrich <[EMAIL PROTECTED]> wrote: > >> Practical question: What's a _complete_ list of the >> escapes included in the "and so forth" in (**)? >> >> (Or is there a function somewhere that will convert >> r"\remark{Hint}" to r"\\remark{Hint}" for me, and >> do the same for precisely the escpapes referred to >> in the "and so forth"?) >> > >As the documentation says: > >Character escapes >Numbered Groups: \0 \1 \2 \3 ... >Named groups: \g<name> >Numbered groups with explicit termination of the number: \g<0> \g<1> ...
Right - I was wondering about a complete list of character escapes. >But it doesn't matter what the complete list is. All of the escapes start >with \ so doubling all the \\ will prevent any of them being interpreted as >special so if you aren't wanting to substitute any groups into the string >just try repl.replace('\\', r'\\') Good point. David C. Ullrich -- http://mail.python.org/mailman/listinfo/python-list