using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?s)(?:<td[^<]*>|\G(?!^))(?:<[^<]+>)?(?!\s+)([^<]*)(?:<[^<]+>)?";
string input = @"<table class=""fiche_table_caracter""><tbody>
<tr>
<td class=""caracteristique""><strong>Design</strong></td>
<td>Classique (full tactile)</td>
</tr>
<tr>
<td class=""caracteristique""><strong>Système d'exploitation (OS)</strong></td>
<td>iOS</td>
</tr>
<tr>
<td class=""caracteristique""><strong>Ecran</strong></td>
<td>4,7'' (1334 x 750 pixels)<br />16 millions de couleurs</td>
</tr>
<tr>
<td class=""caracteristique""><strong>Mémoire interne</strong></td>
<td>128 Go, 1 Go RAM</td>
</tr>
<tr>
<td class=""caracteristique""><strong>Appareil photo</strong></td>
<td>8 mégapixels</td>
</tr>
</tbody>
</table>";
foreach (Match m in Regex.Matches(input, pattern))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx