sphinx Posted October 24, 2011 Share Posted October 24, 2011 This doesn't appear to be pregmatching: <?php $page_contents = file_get_contents("qwebsite.com/dj.php"); $matches = array(); preg_match('/Kadio :: ([a-zA-Z]+) ([a-zA-Z]+)/', $page_contents, $matches); echo $matches[0]; ?> Kadio :: Mobocracy (Temp) Dj It's really annoying because when different people DJ, some people have spaces, some don't etc and some have () brackets.. so it's really hard to get a preg match all of the time. Link to comment https://forums.phpfreaks.com/topic/249698-not-pregmatching/ Share on other sites More sharing options...
sphinx Posted October 24, 2011 Author Share Posted October 24, 2011 For users needing help, solved with: preg_match('~Kadio :.*?)</b>~i',$page_contents, $matches) Link to comment https://forums.phpfreaks.com/topic/249698-not-pregmatching/#findComment-1281743 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.