我在这里有这段代码,我需要返回只有数字的args.Content (我的输入数据)并删除其余的字符。我一直在用正则表达式尝试很多东西,但它对我不起作用。我对 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";
}
}
}
希望你能帮忙