<?php $tests = array(
		'http://f...content-available-to-author-only...k.com/walterwhite',
		'https://w...content-available-to-author-only...k.com/Nightmare/profile',
		'https://f...content-available-to-author-only...k.com/bacco?page=contacts',
		'http://w...content-available-to-author-only...k.com/roberval',
		'http://w...content-available-to-author-only...k.com/profile.php?id=Guilherme',
		'http://w...content-available-to-author-only...k.com/profile.php?x=99&id=Bigown&b=389',
		'http://w...content-available-to-author-only...k.com/profile.php?id=Lautert&x=99',
		'http://www.google.com/search'
	);
	foreach( $tests as $test ) echo '['.fbUser( $test ).']'.PHP_EOL;

	function fbUser( $url ) {
		$rgx = '~^https?://(www\.)?facebook.com/(?|profile\.php\?(?:.*&)*id=([^&]*)|([^/\?]*))~';
		if( preg_match( $rgx, $url, $matches ) ) return $matches[2];
	}