Reputation: 159
I'm trying to remove \'
from an string
string temp = "[['90\'','','Delay in match Cédric Kanté (Sochaux) because of an injury.','away']]";
temp = Regex.Replace(temp, @"\\'", ""); >> still have ' mark [['90'','','...']
I've tried many ways but failed.
Thanks
Upvotes: 0
Views: 69
Reputation: 116108
It is in a form that can be parsed by json serilaizers. No need for Regex.
string temp = @"[['90\'','','Delay in match Cédric Kanté (Sochaux) because of an injury.','away']]";
var js = new JavaScriptSerializer();
List<List<string>> listOfList = js.Deserialize<List<List<string>>>(temp);
foreach (var item in listOfList[0])
Console.WriteLine(item);
Upvotes: 0