2018 up to now | 2017 | 2016 | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007

(older archive entries before 2007 are not shown here, but included in the onsite-search)

Mailing List - Entries of 2007


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[QF-Test] Replace a backslash by two backslashes


  • Subject: [QF-Test] Replace a backslash by two backslashes
  • From: René Hegeman <Rene.Hegeman@?.nl>
  • Date: Wed, 15 Aug 2007 17:22:54 +0200

Hi all,
 
I am trying to replace a backslash by two backslashes with this script:
 
name = rc.lookup("i_path")
name = name.replace('\','\\')
rc.setLocal("i_path", name)
 
i_path can be \\server\folder\file.txt and need to be transferred into \\\\server\\folder\\file.txt
 
However, this scripts gives an error message:
SyntaxError: Lexical error at line 4, column 27. Encountered: "\\" (92), after : "\\"
 
Does anyone knows how to replace the backslash by two backslashes?
 
Greetings,
 
René Hegeman
Planon