求正则表达式取值的方法
string content="sssssssssssssssssssssss[POINT=300]内容[/POINT]ssssssssssssss"
int point;
怎么获取content中300这个数值并赋给point
1、
string strTemp = "<td width=\"17\" height=\"12\" bgcolor=\"#FF0000\">25</td>";
Regex regInt = new Regex("(?<=>)\\d+(?=<)",RegexOptions.IgnoreCase);
MatchCollection matchsInt = regInt.Matches( strTemp );
MessageBox.Show ( matchsInt[0].Value );
2、
Regex reg;
string pattern;
Match m;
string TDValue;
string str=@"<td width=34>564</td>";
pattern = @"^<td [^>]+>(?<TDValue>\td+)<[^>]+>$";
reg = new Regex(pattern,RegexOptions.IgnoreCase);
if(reg.IsMatch(str))
{
m = reg.Matches(str)[0];
TDValue=m.Groups["TDValue"].Value;
MessageBox.Show( TDValue );
}
谁能把这两种取td间值的正则改成我需要的正则
解决请去此帖接另100分
http://community.csdn.net/Expert/topic/5036/5036911.xml?temp=.9675714