I have html example
<a href="http://ift.tt/1DvoowN" class="same-class">CONTENT1</a>
<a href="http://ift.tt/1DvoowN" class="same-class">CONTENT2</a>
I tried some different regex matching in order to get all CONTENTs. I have managed to make a match at: https://regex101.com This is returning only the first match. But even this is not working in C#
I have this code:
var matches = Regex.Matches(html, @"andOfQS"" class=""same-class"">(.*)<\/a>", RegexOptions.IgnoreCase & RegexOptions.Multiline);
foreach (Match match in matches) {
}
But, it return 0 matches. Please help me to get all CONTENTs (1 to n).
Aucun commentaire:
Enregistrer un commentaire