请教一个简单的正则表达式?问题解决马上给分。。。
<td height= "23 " align= "center "> 2007112 </td>
这个用正则表达式替换怎么搞?
<td\s+height= "23 "\s+align= "center "> \s+[0-9]+ </td> ?
我知道上面的是不对的。。。 那个双引号怎么办啊?用转义字符么?
还有那个\s VS2005老是提示无效的转义字符
if (Regex.IsMatch(line, " <td\s+height= "23 "\s+align= "center "> \s+2007112 </td> "))
------解决方案--------------------public static Regex regex = new Regex(
@ " <td\s+height=\ " "23\ " "\s+align=\ " "center\ " "> \s+[0-9]+ </td> ",
RegexOptions.IgnoreCase
| RegexOptions.CultureInvariant
| RegexOptions.IgnorePatternWhitespace
| RegexOptions.Compiled
);