0

I want to remove some special characters from a string. This is my string :

"\":\"mysitetext.co.au/tt/L6EL92JZ\"}"

I want to get results like this:

"mysitetext.co.au/tt/L6EL92JZ"

I tried with regex command as below but didn't work

myLink = "\":\"mysitetext.co.au/tt/L6EL92JZ\"}";
Regex reg = new Regex("\":}");
myLink = reg.Replace(myLink , "");

What am I doing wrong here?

Thank you.

ChinS
  • 87
  • 1
  • 8
  • 2
    That looks like it's part of a JSON payload. If that's true, you should use a JSON parser. It's easier and more reliable. – madreflection Dec 03 '21 at 05:12

0 Answers0