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? Quote 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); Quote 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 Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.