On Wed, 2011-10-26 at 12:48 -0700, Ross Boylan wrote:
I want to replace every \ and (the two characters for backslash and
double quotes) with a \ and the same character, i.e.,
\ - \\
- \
I'd like to thank Ian, Dave, MRAB, and John for their helpful responses.
I hadn't realized the
On Oct 26, 2:47 pm, Dave Angel d...@davea.name wrote:
On 10/26/2011 03:48 PM, Ross Boylan wrote:
I want to replace every \ and (the two characters for backslash and
double quotes) with a \ and the same character, i.e.,
\ - \\
- \
I have not been able to figure out how to do
I want to replace every \ and (the two characters for backslash and
double quotes) with a \ and the same character, i.e.,
\ - \\
- \
I have not been able to figure out how to do that. The documentation
for re.sub says repl can be a string or a function; if it is a string,
any backslash escapes
On Wed, Oct 26, 2011 at 1:48 PM, Ross Boylan r...@biostat.ucsf.edu wrote:
Or perhaps I'm confused about what the displayed results mean. If a
string has a literal \, does it get shown as \\?
In the repr, yes. If you try printing the string, you'll see that it
only contains one \.
By the way,
On 10/26/2011 03:48 PM, Ross Boylan wrote:
I want to replace every \ and (the two characters for backslash and
double quotes) with a \ and the same character, i.e.,
\ - \\
- \
I have not been able to figure out how to do that. The documentation
for re.sub says repl can be a string or a
On 26/10/2011 20:48, Ross Boylan wrote:
I want to replace every \ and (the two characters for backslash and
double quotes) with a \ and the same character, i.e.,
\ - \\
- \
I have not been able to figure out how to do that. The documentation
for re.sub says repl can be a string or a