Re: a n00b regex qestion

2007-12-03 Thread Tim Chase
> I tried these this: > > string = string.replace('\s*Field One\s* > %FieldOneValue%\s*', '') > > > But this doesn't work. The doco for Python's regex suggests that \s > should match any whitespace including newlines which is what I > wanted, from http://docs.python.org/lib/module-re.html "

Re: a n00b regex qestion

2007-12-03 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > I am doing a string.replace in a simple table generation app I wrote, > and I can't figure out how to match whitespace with /s, Hahem... Where did you get the idea that str.replace would work with regexps ? """ replace(...) S.replace (old, new[, count]) -> st