I'm try to parse some html content, here's the HTML content:
<font color="green"> *TITLE* </font> Some Event Name 1:15pm-5:00pm <font color="gold">Stream 5</font><p>
<font color="green"> *TITLE* </font> Some: Event Name 1:30pm-5:00pm <font color="gold">Stream 4</font><p>
<font color="green"> *TITLE* </font> Some, Event Name 1 with num 1:30pm-7:30pm <font color="gold">CHANNEL TWO 2 STREAM http://http://domain.com/path/to/page-2-online.html</font><p>
<font color="green"> *TITLE* </font> Event two 2.45pm-4.45pm <font color="gold">Stream 16</font><p>
<font color="green"> *TITLE* </font> Event THREE summary 2.45pm-4.45pm <font color="gold">Stream 2</font><p>
<font color="green"> *TITLE* </font> Event with a lot of summary 4:00pm-6:00pm <font color="gold">CHANNEL THREE 3 STREAM http://domain.com/path/to/page-3-online.html</font><p>
So to parse this and get the "Event Name", "Event Time" and "Stream Number", I'm doing this:
preg_match_all('/<\/font>\s*([^<]+)\s+(\d+.\d+\s*\w{2}\s*-\s*\d+.\d+\s*\w{2}).*?tream\s*(.*?)\s*<\/font><p>/', $data, $matches);
And It returns everything correctly, however stream number with http link is also returned which i don't want. I just want the name (For some) & number only.
Data Needed:
5
4
CHANNEL TWO 2 STREAM
16
2
CHANNEL THREE 3 STREAM
Currently it returns:
5
4
-online.html
16
2
-online.html
Can anyone please help? Not a pro in regex, been trying for last 2 days. Thanks in advance!!!