<?php
$fullURLSample = /*str_replace( "\r", '',*/
'https://www.facebook.com/dialog/feed?app_id={app_id}&link={url}&picture={img}&name={title}&description={desc}&redirect_uri={redirect_url}
https://twitter.com/share?url={url}&text={title}&via={via}&hashtags={hashtags}
https://plus.google.com/share?url={url}
https://pinterest.com/pin/create/bookmarklet/?media={img}&url={url}&is_video={is_video}&description={title}
http://www.youtube.com/watch?v=uMdl80k-3yo
https://vimeo.com/391720
https://www.flickr.com/photos/eshu/galleries/72157621948084368/
http://picasa.google.com.au/
http://instagram.com/username111
https://foursquare.com/explore?cat=food&mode=url&near=Wollongong%2C%20NSW
http://every1-knows-its-butters.tumblr.com/
http://www.tumblr.com/share/link?url={url}&name={title}&description={desc}
skype://notsurewhatgoeshere
https://soundcloud.com/iambrodydalle
http://www.linkedin.com/shareArticle?url={url}&title={title}
https://github.com/chrisburgess7
http://dribbble.com/MailChimp
https://itunes.apple.com/au/podcast/the-history-of-britain/id802163163?mt=2';
$urlRegex1 = '_' .
'(?:(?:https?)://)' .
'(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*\.?';
$urlRegex2 = '(?:\.(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)*' . // domain name
'(?:\.(?:[a-z\x{00a1}-\x{ffff}]{2,}))' . // TLD identifier
'(?::\d{2,5})?(?:/[^\s]*)?' . // rest of path
'_iuS';
var_dump( preg_match( $urlRegex1 . 'facebook' . $urlRegex2, $fullURLSample ) );
$urls = preg_replace( $urlRegex1 . 'facebook' . $urlRegex2, 'http://www.facebook.com', $fullURLSample );
$err = preg_last_error();
var_dump( $err );
if ( $err === PREG_INTERNAL_ERROR ) {
echo 'Error!';
}
var_dump( $urls );
- Output for git.master, git.master_jit, rfc.property-hooks
- int(1)
int(2)
NULL
This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.
Active branches
Archived branches
Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page
preferences:
39.78 ms | 401 KiB | 8 Q