容易正则

简单正则要处理的字符串:asdfxxxxxPages: 1/50Go需要提取:Pages: 1/ 后面的50这个数字(肯定是数字),可变的

简单正则
要处理的字符串:
asdfxxxxxPages: 1/50     Go 

需要提取:Pages: 1/ 后面的50这个数字(肯定是数字),可变的。

(可以用&nbsp定位)

求证则。

[解决办法]
regex.match("",@"/\d+").value
[解决办法]

C# code
    string str = @"asdfxxxxxPages: 1/50&nbsp; &nbsp; &nbsp;Go ";            str = System.Text.RegularExpressions.Regex.Match(str, @"(?<=Pages:\s*\d+/)\d+(?=\s*|(&nbsp))").Value;            Response.Write(str);
[解决办法]
C# code
string str = Regex.Match("asdfxxxxxPages: 1/50&nbsp; &nbsp; &nbsp;Go",@"(?<=\d+?/)\d+?(?=\s+|&nbsp)").Value;                //50