Regular Experssion Question

P

pmclinn

I'm trying to understand how to parse text that contains line breaks.
Below I have some html code that I'm trying to parse using a regular
expression. The problem is that my expression works on all tags
[<span></span>] that do not include linebreaks.

I wrote this regular expersion that is almost perfect.
"<span\sclass="tableListing-*.*</span>"

Results of regex:

<span class="tableListing-date">Tue, 11/08/05<br>03:00 PM</span>
<span class="tableListing-act">Nine Inch Nails</span>
<span class="tableListing-venue"><a href="/venue/8337">TD Banknorth
Garden (formerly Fleetcenter)</a> Boston, MA</span>
<span class="tableListing-date">Tue, 11/08/05<br>07:00 PM</span>

but.... I'm missing this line...:

<span class="tableListing-info">
<a
href="http://www.ticketmaster.com/event/01003AEF87773082?artistid=735762&majorcatid=10001&minorcatid=60"
class="findTickets">Find Tickets</a>on sale now


</span>
<----Missing end>

</


Here is the raw code:
<tr>
<td class="left">
<span class="tableListing-date">Tue, 11/08/05<br>07:00
PM</span></td>
<td class="center">
<span class="tableListing-act">Nine Inch
Nails</span></td>
<td class="center">
<span class="tableListing-venue"><a
href="/venue/8337">TD Banknorth Garden (formerly Fleetcenter)</a>
Boston, MA</span></td>
<td class="right" nowrap="nowrap">
<span class="tableListing-info">
<a
href="http://www.ticketmaster.com/event/01003AEF87773082?artistid=735762&majorcatid=10001&minorcatid=60"
class="findTickets">Find Tickets</a>on sale now


</span></td>
</tr>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top