<a href="http://www.logo8831.com/index.html?code=yes123"></a>
我要取得yes123,
现规定有个string str="http://www.logo8831.com/index.html?code=此处写正则表达式"
接着根据str来匹配出yes123
如何写这样的表达式???
我试过
string str="http://www.logo8831.com/index.html?code=(\S+)
取出的数据为yes123"></a> 多了"></a>这些。
请高手帮助,谢谢。
我要取得yes123,
现规定有个string str="http://www.logo8831.com/index.html?code=此处写正则表达式"
接着根据str来匹配出yes123
如何写这样的表达式???
我试过
string str="http://www.logo8831.com/index.html?code=(\S+)
取出的数据为yes123"></a> 多了"></a>这些。
请高手帮助,谢谢。
(?<=code=)\w+(?=\")
这样?
string sourceString = @"<a href=""http://www.logo8831.com/index.html?code=yes123""></a>";
string pattern = @"code=([^""]*)";
System.Text.RegularExpressions.Match result = Regex.Match(sourceString,pattern,System.Text.RegularExpressions.RegexOptions.IgnoreCase); WL(result.Groups[1].Value);
//////////////////////////////////////////////
MSN:[email protected]请给我一个与您交流的机会!