I have some html code like this
<div class="itm hasOverlay lastrow">
<a id="3:LE343SPABGLIANID" class="itm-link itm-drk trackingOnClick" title="League Sepatu Casual Geof S/L LO - Hitam/Biru" href="league-sepatu-casual-geof-sl-lo-hitambiru-68166.html" rel="-standard|">
</a>
<div class="itm-overlay itm-group-mainbox-with-group"></div>
</div>
What should I do to get text league-sepatu-casual-geof-sl-lo-hitambiru-68166.html in
<a href="league-sepatu-casual-geof-sl-lo-hitambiru-68166.html">?
That should be rather simple...
... although this makes some assumptions, of course: Namely, that the
inputStringis only the string that you posted (and that this part is not enclosed in other tags), and that this part only contains a single link (a).(If these assumptions are not valid, one somehow has to identify this particular
divand the correctatag. For example, by searching for adivwith the attributeclass="itm hasOverlay lastrow"and for aawith the classclass="itm-link itm-drk trackingOnClick"- in any case, one has to know more about the actual structure of the document from which this information should be extracted)