Re: re quiz

2008-06-12 Thread John Machin
On Jun 12, 8:57 pm, David C. Ullrich [EMAIL PROTECTED] wrote: True or False? (no fair looking it up) (*) If repl is a string then re.sub(pattern, repl, s) returns s with non-overlapping occurences of pattern replaced by repl. I assumed it was true - spent a few hours trying to figure out

Re: re quiz

2008-06-12 Thread Peter Otten
David C. Ullrich wrote: (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?) I think you just have to escape the backslash: re.sub(pattern, replacement_string.replace(\\,

Re: re quiz

2008-06-12 Thread Duncan Booth
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

Re: re quiz

2008-06-12 Thread David C. Ullrich
On Thu, 12 Jun 2008 05:12:55 -0700 (PDT), John Machin [EMAIL PROTECTED] wrote: On Jun 12, 8:57 pm, David C. Ullrich [EMAIL PROTECTED] wrote: True or False? (no fair looking it up) (*) If repl is a string then re.sub(pattern, repl, s) returns s with non-overlapping occurences of pattern

Re: re quiz

2008-06-12 Thread David C. Ullrich
On Thu, 12 Jun 2008 14:12:31 +0200, Peter Otten [EMAIL PROTECTED] wrote: David C. Ullrich wrote: (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?) I think you just have

Re: re quiz

2008-06-12 Thread David C. Ullrich
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

Re: re quiz

2008-06-12 Thread Johannes Bauer
David C. Ullrich schrieb: -- care to tell us what a certain re.sub is, and false in what way? Read the OP. Well, aren't you funny. Maybe you should have referenced the other thread so one can find the OP? Regards, Johannes -- Wer etwas kritisiert muss es noch lange nicht selber besser

Re: re quiz

2008-06-12 Thread David C. Ullrich
In article [EMAIL PROTECTED], Johannes Bauer [EMAIL PROTECTED] wrote: David C. Ullrich schrieb: -- care to tell us what a certain re.sub is, and false in what way? Read the OP. Well, aren't you funny. Maybe you should have referenced the other thread so one can find the OP?