Elomelo Posted June 26, 2009 Share Posted June 26, 2009 am trying to extract data from <TD><b>Premium</b> <font style="font-size:12px;">(1 days remaining - <a href="?c=premium">extend</a>)</font></TD> I Need the remaining days so i tried with preg_match('/Premium<\/b> <font style="font-size:12px;">(.*?)<a href="?c=premium">extend<\/a>/', $r1esult, $date); but nothin happening ??? Plus i Also Tried Another One <TD width="175">Account created:</TD> <TD><b>2007-09-21</b></TD> preg_match('/<TD width="175">Account created:<\/TD> <TD><b>(.*?)</b><\/TD>/', $r1esult, $date); so whats the wrong am doing? can anyone help me out? Link to comment https://forums.phpfreaks.com/topic/163793-need-help-with-preg_match/ Share on other sites More sharing options...
rhodesa Posted June 26, 2009 Share Posted June 26, 2009 preg_match('/Premium<\\/b> <font style="font-size:12px;">\((.*?) days remaining - <a href="\?c=premium">extend<\\/a>/', $r1esult, $date); Link to comment https://forums.phpfreaks.com/topic/163793-need-help-with-preg_match/#findComment-864240 Share on other sites More sharing options...
Elomelo Posted June 26, 2009 Author Share Posted June 26, 2009 Thanks rhodesa btw <TD><b>9004</b> (<a href="?c=rewards" style="font-size:12px;">redeem</a>)</TD> preg_match('/<TD><b>(.*?)<\\/b> (<a href="\?c=rewards" style="font-size:12px;">redeem<\\/a>/', $r1esult, $point); wats the wrong in it now thanks in advance Link to comment https://forums.phpfreaks.com/topic/163793-need-help-with-preg_match/#findComment-864249 Share on other sites More sharing options...
rhodesa Posted June 26, 2009 Share Posted June 26, 2009 missing the \ before the (<a Link to comment https://forums.phpfreaks.com/topic/163793-need-help-with-preg_match/#findComment-864267 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.