I have the following repeating block of code in a website

<a href="LINK">TITLE</a><br>MANUFACTURER -- YEAR<br>PLATFORM<br>

I need a regular expression to parse out the relevant bits in caps

Ive been trying txt2re.com and expresso... But nothing generated there seems to do a decent job. I guess I need something that matches the whole text and then do a regex on that?? Or match the whole thing and do a capture on the areas? Im just starting on regex and its giving me headaches..

TIA

Recommended Answers

All 2 Replies

The following C# string should suffice:

"<a href=\"LINK\">([^<]+)</a><br>([^<]*) -- (\\d*)<br>([^<]*)<br>"

Thanks. That did the job perfectly.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.