What would be a quick way to extract the value of the title attributes for an HTML table:
...
<li><a href="/wiki/Proclo" title="Proclo">Proclo</a></li>
<li><a href="/wiki/Proclus" title="Proclus">Proclus</a></li>
<li><a href="/wiki/Ptolemy" title="Ptolemy">Ptolemy</a></li>
<li><a href="/wiki/Pythagoras" title="Pythagoras">Pythagoras</a></li></ul><h3>S</h3>
...
so it would return Proclo, Proclus, Ptolemy, Pythagoras,…. in strings for each line. I’m reading the file using a StreamReader. I’m using C#.
Thank you.
This C# regex will find all title values:
The C# code is like this:
The regex uses positive lookbehind to find the position where the
titlevalue starts. It then matches everything up to the ending double quote.