How to decode "\/" in strings

166 views Asked by At

I am parsing a source that frequently contains / encoded as \/. For example, https:// is encoded as https:\/\/.

What is the name of this encoding? It appreas to be used when sending json in HTML. It is a large document and / to \/ mapping probably isn't the only one used. What is the c# function to decode it?

1

There are 1 answers

0
Robert Segdewick On

Using System.Text.RegularExpressions.Regex.Unescape(@"\/\/") seems to do the job.