I have the following two strings and would like to search for when they occur, I’m struggling as they are on different lines with a tab within the HTML file I’m using.
<span class="price">$17.95</span>
<span class="supersaver">
This is what I have tried so far, the value of the price can change, I have tried with just \s+ by itself and also with a combination \n+\t+ etc..
MatchCollection m1 = Regex.Matches(file, @"<span class=""price"">[$]\d+[.]\d+</span>\n+\t+<span class=""supersaver"">",
RegexOptions.Singleline);
I’ve added the quotes in…
Try this:
your solution had to have one or more spaces followed by tabs and no line, the regex above should match any of them.