1

Webサイトからいくつかのデータを取得しました。データ内で urlresult という名前の文字列"http:\/\/www.cnopyright.com.cn\/index.php?com=com_noticeQuery&method=wareList&optionid=1221&obligee=\u5317\u4eac\u6c83\u534e\u521b\u65b0\u79d1\u6280\u6709\u9650\u516c\u53f8&softwareType=1".

私がやりたいのは、上記の文字列urlresultの最初の 3 文字 @'\' を取り除くこと です。私は以下の機能を試しました:

public string ConvertDataToUrl(string urlresult )
{

   var url= urlresult.Split('?')[0].Replace(@"\", "") + "?" + urlresult .Split('?')[1];


  return url

}

"http://www.cnopyright.com.cn/index.php?com=com_noticeQuery&method=wareList&optionid=1221&obligee=\\u5317\\u4eac\\u6c83\\u534e\\u521b\\u65b0\\u79d1\\u6280\\u6709\\u9650\\u516c\\u53f8&softwareType=1"どちらが間違っているかを返します。

正しい結果は "http://www.cnopyright.com.cn/index.php?com=com_noticeQuery&method=wareList&optionid=1221&obligee=北京沃华创新科技有限公司&softwareType=1"

私は多くの方法を試しましたが、うまくいきませんでした.正しい結果を得る方法がわかりません.

4

2 に答える 2