PyraX Posted December 4, 2010 Share Posted December 4, 2010 im trying to find everything between <a href="javascript:void(0);" onclick="return false;"> and </a> Here is what I have tried but it didnt work preg_match_all('/<a href="javascript:void(0);" onclick="return false;">.*?</a>/',$data,$matches); Quote Link to comment Share on other sites More sharing options...
JAY6390 Posted December 4, 2010 Share Posted December 4, 2010 preg_match_all('/<a href="javascript:void(0);" onclick="return false;">.*?</a>/s',$data,$matches); Quote Link to comment Share on other sites More sharing options...
PyraX Posted December 4, 2010 Author Share Posted December 4, 2010 its giving me the error message: Warning: preg_match_all() [function.preg-match-all]: Unknown modifier 'a' in C:\AppServ\www\index.php on line 53 Quote Link to comment Share on other sites More sharing options...
PyraX Posted December 4, 2010 Author Share Posted December 4, 2010 fixed it by doing preg_match_all('/onclick="return false;">.*?<\/a>/',$data,$matches); NEXT QUESTION How do I make it so that it doesnt include onclick="return false;"> and </a> in the results? Quote Link to comment Share on other sites More sharing options...
JAY6390 Posted December 4, 2010 Share Posted December 4, 2010 preg_match_all('/onclick="return false;">(.*?)<\/a>/',$data,$matches); Quote Link to comment Share on other sites More sharing options...
PyraX Posted December 4, 2010 Author Share Posted December 4, 2010 yay just got that too thanks Quote Link to comment 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.