I’m trying to run a regex string in my code that will pick up everything that is between <li class="f" and </li>
string regex = @"\<li\sclass="f"(\s*?.*?)*?\</li>";
But the syntax is wrong because of the quotes. I tried replacing them with just '
but it didn’t find anything.
The regex string is working by-the-way it’s just these quotes that are not. I was trying to look after some replacement like space–>/s and didn’t find anything.
To escape the quotes in a string, double them:
I’ve also “fixed” your regex a bit, but it’s still not a good idea to be using a regex for parsing HTML.