Hi there guys, I am trying to put together a regular expression for pulling out data from the html below. The text I am interested in, is in line 3,22, and "href" of line 25. I have have put together this regular expression for line 25 and it works perfectly
<a\\s+class=\"linkDetails\"\\s+href=\"(.*)\"\\s+target=\"_blank\"\\s+title=\"Details\">
<a\\s+class=\"linkDetails\"\\s+href=\"(.*)\"\\s+target=\"_blank\"\\s+title=\"Details\">
To copy to clipboard, switch view to plain text mode
I would like to extend the above regular expression to retrieve line 3 and 22 as well and through the use of QRegExp::cap(), I can store the data accordingly in a QStringList. I could use a little help with extending the R.E.
<tr class="gridDetails">
<td style="width: 70px;">
R01170512A
</td>
<td>
Gloves;nytrile, heavy duty;10
</td>
<td style="width: 100px; padding-right: 10px;">
Clothing - PPE & Accessories
</td>
<td style="width: 70px; padding-right: 10px;">
2017/03/15
</td>
<td style="width: 70px; padding-right: 10px;">
3/15/2017 10:00:00 AM
</td>
<td style="width: 70px; padding-right: 10px;">
2017/03/09
</td>
<td style="width: 70px; padding-right: 10px;">
3/9/2017 9:59:27 AM
</td>
<td style="width: 10px; padding-right: 5px; padding-left: 5px;">
<a class="linkDetails" href="/web1/ProcurementPortal/RFQ/Details/123668" target="_blank" title="Details"> </a>
</td>
</tr>
<tr class="gridDetails">
<td style="width: 70px;">
R01170554A
</td>
<td>
Overall trousers;white;34/87cm
</td>
<td style="width: 100px; padding-right: 10px;">
Clothing - PPE & Accessories
</td>
<td style="width: 70px; padding-right: 10px;">
2017/03/15
</td>
<td style="width: 70px; padding-right: 10px;">
3/15/2017 10:00:00 AM
</td>
<td style="width: 70px; padding-right: 10px;">
2017/03/09
</td>
<td style="width: 70px; padding-right: 10px;">
3/9/2017 9:59:27 AM
</td>
<td style="width: 10px; padding-right: 5px; padding-left: 5px;">
<a class="linkDetails" href="/web1/ProcurementPortal/RFQ/Details/123667" target="_blank" title="Details"> </a>
</td>
</tr>
<tr class="gridDetails">
<td style="width: 70px;">
R01170512A
</td>
<td>
Gloves;nytrile, heavy duty;10
</td>
<td style="width: 100px; padding-right: 10px;">
Clothing - PPE & Accessories
</td>
<td style="width: 70px; padding-right: 10px;">
2017/03/15
</td>
<td style="width: 70px; padding-right: 10px;">
3/15/2017 10:00:00 AM
</td>
<td style="width: 70px; padding-right: 10px;">
2017/03/09
</td>
<td style="width: 70px; padding-right: 10px;">
3/9/2017 9:59:27 AM
</td>
<td style="width: 10px; padding-right: 5px; padding-left: 5px;">
<a class="linkDetails" href="/web1/ProcurementPortal/RFQ/Details/123668" target="_blank" title="Details"> </a>
</td>
</tr>
<tr class="gridDetails">
<td style="width: 70px;">
R01170554A
</td>
<td>
Overall trousers;white;34/87cm
</td>
<td style="width: 100px; padding-right: 10px;">
Clothing - PPE & Accessories
</td>
<td style="width: 70px; padding-right: 10px;">
2017/03/15
</td>
<td style="width: 70px; padding-right: 10px;">
3/15/2017 10:00:00 AM
</td>
<td style="width: 70px; padding-right: 10px;">
2017/03/09
</td>
<td style="width: 70px; padding-right: 10px;">
3/9/2017 9:59:27 AM
</td>
<td style="width: 10px; padding-right: 5px; padding-left: 5px;">
<a class="linkDetails" href="/web1/ProcurementPortal/RFQ/Details/123667" target="_blank" title="Details"> </a>
</td>
</tr>
To copy to clipboard, switch view to plain text mode
Bookmarks