This question already has an answer here:
Well I have a mini program with C#, so I do this in my program
wordSearch = "T:\\" wordReplace = "T:\\Gestion\\" content = Regex.Replace(content, wordSearch, wordReplace);
But doesn't work. The error ir parsing "T:\" - illegal \ at end of pattern.
Any idea ?
Thanks!
Sorry! Perhaps I don't explain well. So... I try again
Hi,
I did a form taking a string for input, but if this string is "T:\", the program take "T:\". So, this string I save in a variable "workShearch".
After this variable uses in:
content = Regex.Replace(content, Regex.Escape(wordSearch), Regex.Escape(wordReplace));
But this line contain an error, because wordSearch in this case is "T:\", and the program trhow me an exception like that:
The error ir parsing "T:\" - illegal \ at end of pattern.
Thanks!