日期:2014-05-17  浏览次数:20428 次

编辑器里面内容要过滤图片和截取一定数量文字?
高手 帮忙写个  过滤并截取的  方法!!!!

------解决方案--------------------

 public string SqlFilter(string InText)
    {

        string word = "and
------解决方案--------------------
aaa
------解决方案--------------------
or
------解决方案--------------------
ggf";//过滤条件自己写  
------解决方案--------------------
为分隔符
        if (InText == null)
            return "";
        foreach (string str_t in word.Split('
------解决方案--------------------
'))
        {
            InText.Replace(str_t,"")
        }
        return InText;
    }


大概这样子差不多了