做了个采集规则,想替换采集到的部分内容或广告应该怎么做呢?

来源:百度知道 编辑:UC知道 时间:2024/06/14 06:54:29

在函数接口的地方写

[code]
$regExp = "你要替换的内容";
@me = preg_replace($regExp,"你要换成的内容",@me);
[/code]

string ReplaceRegex(string inputText, string regularExpression, RegexOptions options)
{
Regex regex = new Regex(regularExpression, options);
return regex.Replace(inputText, "你要换成的内容");
}