[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Extract Data from a Webpage

Asked by jimmy282 in Regular Expressions, Cold Fusion Markup Language

Tags: Regex

I have a page where the data is in the below pattern

<html> <body>
<table>
<tr>
<td class='heading'>
some text
</td>
</tr>
<tr>
<td class='subheading'>sub1</td><td class="subheading'>sub2</td>
</tr>
<tr>
<td class='subheading'>sub3</td><td class="subheading'>sub4</td>
</tr>
</table>

<table>
<tr>
<td class='heading'>
some other heading
</td>
</tr>
<tr>
<td class='subheading'>sub1</td><td class="subheading'>sub2</td>
</tr>
<tr>
<td class='subheading'>sub3</td><td class="subheading'>sub4</td>
</tr>
</table>

I want to be able to extract all the headings and subheadings and associate the proper heading with their subheading..

what would be the easiest way to do this in regex or is there any other way to do this ?
 
Related Solutions
Keywords: Extract Data from a Webpage
 
Loading Advertisement...
 
[+][-]11/04/09 07:37 AM, ID: 25740362Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/04/09 07:55 AM, ID: 25740587Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/04/09 11:44 AM, ID: 25743095Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/05/09 03:14 PM, ID: 25755144Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/09/09 09:17 AM, ID: 25777900Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/09/09 12:15 PM, ID: 25779538Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625