kevinkhan Posted January 4, 2011 Share Posted January 4, 2011 {"profile_id":100000503667042,"sk":"wall"} im looking for a regular expression to extract the profile id from this... anyideas what is wrong with this preg_match('|{"profile_id":[0-9],"sk":"wall"}|', $page, $match); if(!$match || count($match)<=0) { printEcho("Can not find friend page link."); disconnect($con); exit(0); } $profileId = $match[0]; Link to comment https://forums.phpfreaks.com/topic/223387-regular-expression-for-this-piece-of-code/ Share on other sites More sharing options...
JAY6390 Posted January 4, 2011 Share Posted January 4, 2011 You need a + after [0-9] Link to comment https://forums.phpfreaks.com/topic/223387-regular-expression-for-this-piece-of-code/#findComment-1154745 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.