I am a total noob at regular expressions and need to parse some html. I am looking for individual categories. The following is what the html looks like:
<p>Categories:
<a href="/some/URL/That/I/dont/need">Category1</a> |
<a href="/could/be/another/URL/That/I/dont/need">Category2</a>
</p>
There could be 1-5 categories. What I need is the "Category1 or Category2 etc"
This project is in c# using Visual Studio 2010. Currently what I have is this:
private static readonly Regex _categoriesRegex = new Regex("(<p>Categories:)((/w/.?<Categories>.*?).*?)(</p>)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
I know I am probably way off but wondering if anyone could at least lead me in the right direction.