使用C#中的正则表达式来匹配字符串中以"textarea": "开头,以"结尾的内容,并将匹配到的内容保存在match变量中。
// 使用正则表达式提取目标字符串
Match match = Regex.Match(hYRecords.jsonContent, "\"textarea\": \"(.*?)\"");
if (match.Success)
{
// 输出匹配到的结果
string result = match.Groups[1].Value;
Debug.Log(result);
}
else
{
Debug.Log(“空”);
}