Instead of just stripping them, how do I make a ' into a \' and " into a \". I tried using your example and adapting it but the result was \\\\\\\\\\\\\\\\\\\\\\\\\\\\' because it keeps looping just looking for the single character.
Any ideas appreciated.
Ian.