我正在尝试使用C#匹配HTML文件的<td>
标记内部文本中的内容。
我正在使用以下代码:
matchValue = "^.*" + TDInnerText + ".*$";
match = Regex.Match(innerText, @matchValue, RegexOptions.Multiline);
if (match.Success) {
// Do Something
}
当我调试程序时,变量下的值如下:
innerText = "\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n Our industry aligned technology architects provide solutions that work and that add exceptional value. We understand business intricacy; we know our technology and we know how to bring this knowledge and understanding together to provide end-to end domain specific intuitive strategic solutions. \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"
matchValue = "^.*Our industry aligned technology.*$"
我在在线正则表达式评估程序中检查了这些值,并检测到匹配。
但是,该程序会为false
返回match.Success
。
我在这里错过了什么吗?