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. Quote 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) Quote Link to comment https://forums.phpfreaks.com/topic/249698-not-pregmatching/#findComment-1281743 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.