private string GetContentText(ContentManagerContentResult content) { var text = content.Contents.FirstOrDefault().ContentText; if (string.IsNullOrEmpty(text)) { return(text); } text = Regex.Replace(text, "[\n\r]+", " ", RegexOptions.IgnoreCase | RegexOptions.CultureInvariant); text = Regex.Replace(text, "\\s+", " ", RegexOptions.IgnoreCase | RegexOptions.CultureInvariant); return(text); }
private string ExtractAnswer(ContentManagerContentResult content) { //Status = 0 -> ExactMatch return(content.Status == 0 ? GetContentText(content) : "NotMatch"); }