开发者

extract specific text from data

I have below text and I want to extract Comment allez-vous from below text how do I extract using C# ?. This text will be different 开发者_运维技巧all the time. rest of the data format is the same.

handleResponse({
 "data": {
  "translations": [
   {
    "translatedText": "Comment allez-vous"
   }
  ]
 }
}
);


It's JSON. Use a JSON parser for .Net like JSON.NET or the JavaScriptSerializer


  1. Look for last index of ". index A

  2. Find first index for translatedText + length of translatedText +1. index B

  3. fetch all string betwee B and A.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜