On 5/30/07, Robert Klemme <shortcutter / googlemail.com> wrote: > On 30.05.2007 17:28, Alex LeDonne wrote: > > Same workaround, but easier to read (to me, anyway): > > '30 May 2007'.sub(re, '\1 ' << var << ' \3') > > Since you're assembling a string, there's no need to interpolate. > > Um, what? Assembling strings is exactly what string interpolation is > used for (what else would it be?). Granted, there are multiple ways to > do it but your statement seems to be a bit off the mark. Sorry for my imprecision, and thank you. I meant to say that if you're _concatenating_, then there's no need to interpolate. The double-quote, double-backslash solution presented by others uses interpolation instead of concatenation. In hindsight, I suppose the backslash construction is also a form of interpolation, so my comment didn't make much sense after all. Ah, well. At least the modified regex worked. :) -Alex