G Guest Jul 22, 2005 #1 Does anyone know how to change / into \ in a string and do it for all occurances? Regex.Replace(s, "\\", "/") ??
Does anyone know how to change / into \ in a string and do it for all occurances? Regex.Replace(s, "\\", "/") ??
Z Zoury Jul 22, 2005 #2 Hi Lucio ! :O) There is no need for Regex here.. : '*** s = s.Replace("/", "\") '***
G Guest Jul 22, 2005 #3 s = s.Replace("/", "\") Hi, I have a slight problem, my string has embeded quotes like this ""one\two\three\etc"" this seems to prevent the change, any ideas why?
s = s.Replace("/", "\") Hi, I have a slight problem, my string has embeded quotes like this ""one\two\three\etc"" this seems to prevent the change, any ideas why?
C Cor Ligthert [MVP] Jul 23, 2005 #4 Lucio, No, because this gives exactly the result you asked for. MessageBox.Show("""one\two\three\etc""".Replace("\", "/")) I hope this helps, Cor
Lucio, No, because this gives exactly the result you asked for. MessageBox.Show("""one\two\three\etc""".Replace("\", "/")) I hope this helps, Cor