I'm trying to match contents in the <td>
tag inner text of an HTML file using C#.
I'm using the below code to do so:
matchValue = "^.*" + TDInnerText + ".*$";
match = Regex.Match(innerText, @matchValue, RegexOptions.Multiline);
if (match.Success) {
// Do Something
}
When I debug the program the values under the variables are as follows:
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.*$"
I checked these values in the online regex evaluator and it detected a match.
However, the program returns false
for match.Success
.
Am I missing something here?