Jump to content

Regular Expression for this piece of code


kevinkhan

Recommended Posts

{"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];

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.