Python was converting the \1 in your string to ASCII character code 001.
Try this:
re.sub('(%s)' % re.escape('http://127.0.0.1'), '\\1', var_a)
Alternatively you can use r'\1' instead of '\\1' (the r prefix means to
treat the following string as a raw string instead of processing backslash
escapes).
Don't forget to escape the regular expression pattern, since it contains
special characters such as dots that will match arbitrary characters in the
target string instead of literal periods.
--Tessa
************
[EMAIL PROTECTED] http://www.linuxchix.org