您好,感谢您的关注。条件搜索并替换C#
编辑:我不是一个程序员,我几乎不知道的C#或其他任何语言,所以,很抱歉的问题,我一直在寻找一个解决方案,但没有任何工程。谢谢你低估了我的问题。
为了这一点,我得到这个代码:
using System;
using VisualWebRipper.Internal.SimpleHtmlParser;
using VisualWebRipper;
public class Script
{
public static string TransformContent(WrContentTransformationArguments args)
{
try
{
//Place your transformation code here.
//This example just returns the input data
return args.Content;
}
catch(Exception exp)
{
//Place error handling here
args.WriteDebug("Custom script error: " + exp.Message);
return "Custom script error";
}
}
}
我需要用C#做一个条件这让我找到* args.Content(谁包含变量字符串)字符串“没有限制“,如果查找匹配,则将字符串值更改为数字(0)并将其返回。如果不是没有改变。
所以,我只需要搜索和替换字符串转换成一个数字,如果它与字符串“无SE莲花Exige”相匹配。
许多感谢的努力阅读我的英语水平,希望你能帮助我:)
你尝试过这么远吗?不要指望这个网站做的功课你没有表现出任何的努力... – walther
几个例子会使描述更加清楚千倍 – Snowbear
http://www.whathaveyoutried.com - 请阅读它,为我们着想和我们的同胞兄弟。 – Arran