How to replace a single character with a backslash using regex.replace in C #
1 answer
Try to execute
var result = Regex.Replace("unlocktheinbox.com", "[t]", @"\"); Please note that if you observe result during debugging with the mouse on result . it will look like unlock\\theinbox.com , because \ shielded. But in fact, if you type result or use anywhere, it will unlock\theinbox.com
+3