T
Tuc
Hi,
I'm trying to get a regexp to make a match, and its not working,
and its kicking my ass. The text I'm going against is :
$text='<div id="sr_SearchResultsPageNavTop"> <div
id="sr_SaveSearchImage"><img
src="http://images.match.com/match//search/sr_NavIconPlaceHolder.gif"
width="15
" height="12" alt="" border="0"></div> <div
id="sr_ViewPhotoGalleryText"><a
href="come.aspx?sid=A1065D66-8275-47BE-85F2-AC161E2D6D26&theme=214&trackingid=0
&RN=2102522&lid=7&PN=1&DO=2" class="cssGlobalLinks_PageNav"
id="lnkSaveThisSearch">viewas photo gallery</a></div> <div
id="sr_Pagination"><span
class="cssGlobalSysText_LightGray">page </span><a
href="some.aspx?sid=A1065D66-8275-47BE-85F2-AC161E2D6D26&theme=214&trackingid=0&RN=2102522&lid=8&PN=1&DO=0"
class="cssSr_PaginationCurrentPage" id="lnkPage">1</a><a
href="come.aspx?sid=A1065D66-8275-47BE-85F2-AC161E2D6D26&theme=214&trackingid=0&RN=2102522&lid=8&PN=2&DO=0"class="cssSr_PageNav"
id="lnkPage">2</a><a
href="come.aspx?sid=A1065D66-8275-47BE-85F2-AC161E2D6D26&theme=214&trackingid=0&RN=2102522&lid=8&PN=3&DO=0"
class="cssSr_PageNav" id="lnkPage">';
What I'm looking for is the url between the href and
cssSr_PaginationCurrentPage . When I do it, it ends ip starting at
the first href and going all the way to the
cssSr_PaginationCurrentPage. I've tried \b, I've tried {}, I tried
()'s.... And I just can't get it to get the one url of
some.aspx?sid=A1065D66-8275-47BE-85F2-AC161E2D6D26&theme=214&trackingid=0&RN=2102522&lid=8&PN=1&DO=0
How am I to tell it to start at the cssSr_PaginationCurrentPage
and work backwards to the first instance of href="
Thanks, Tuc
I'm trying to get a regexp to make a match, and its not working,
and its kicking my ass. The text I'm going against is :
$text='<div id="sr_SearchResultsPageNavTop"> <div
id="sr_SaveSearchImage"><img
src="http://images.match.com/match//search/sr_NavIconPlaceHolder.gif"
width="15
" height="12" alt="" border="0"></div> <div
id="sr_ViewPhotoGalleryText"><a
href="come.aspx?sid=A1065D66-8275-47BE-85F2-AC161E2D6D26&theme=214&trackingid=0
&RN=2102522&lid=7&PN=1&DO=2" class="cssGlobalLinks_PageNav"
id="lnkSaveThisSearch">viewas photo gallery</a></div> <div
id="sr_Pagination"><span
class="cssGlobalSysText_LightGray">page </span><a
href="some.aspx?sid=A1065D66-8275-47BE-85F2-AC161E2D6D26&theme=214&trackingid=0&RN=2102522&lid=8&PN=1&DO=0"
class="cssSr_PaginationCurrentPage" id="lnkPage">1</a><a
href="come.aspx?sid=A1065D66-8275-47BE-85F2-AC161E2D6D26&theme=214&trackingid=0&RN=2102522&lid=8&PN=2&DO=0"class="cssSr_PageNav"
id="lnkPage">2</a><a
href="come.aspx?sid=A1065D66-8275-47BE-85F2-AC161E2D6D26&theme=214&trackingid=0&RN=2102522&lid=8&PN=3&DO=0"
class="cssSr_PageNav" id="lnkPage">';
What I'm looking for is the url between the href and
cssSr_PaginationCurrentPage . When I do it, it ends ip starting at
the first href and going all the way to the
cssSr_PaginationCurrentPage. I've tried \b, I've tried {}, I tried
()'s.... And I just can't get it to get the one url of
some.aspx?sid=A1065D66-8275-47BE-85F2-AC161E2D6D26&theme=214&trackingid=0&RN=2102522&lid=8&PN=1&DO=0
How am I to tell it to start at the cssSr_PaginationCurrentPage
and work backwards to the first instance of href="
Thanks, Tuc