function follow_network_regex_external in Follow 6
Verify that a url is� a url.
1 string reference to 'follow_network_regex_external'
- follow_default_networks in ./
follow.module - Retrieves the default networks available.
File
- ./
follow.module, line 630 - Allows users to add links to their social network profiles.
Code
function follow_network_regex_external() {
// @see http://j.mp/2Ol4gj
return '
/^(https?|ftp):\\/\\/(?# protocol
)(([a-z0-9$_\\.\\+!\\*\'\\(\\),;\\?&=-]|%[0-9a-f]{2})+(?# username
)(:([a-z0-9$_\\.\\+!\\*\'\\(\\),;\\?&=-]|%[0-9a-f]{2})+)?(?# password
)@)?(?# auth requires @
)((([a-z0-9][a-z0-9-]*[a-z0-9]\\.)*(?# domain segments AND
)[a-z]{2}[a-z0-9-]*[a-z0-9](?# top level domain OR
)|(\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5]\\.){3}(?#
)(\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])(?# IP address
))(:\\d+)?(?# port
))(((\\/+([a-z0-9$_\\.\\+!\\*\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)*(?# path
)(\\?([a-z0-9$_\\.\\+!\\*\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)(?# query string
)?)?)?(?# path and query string optional
)(#([a-z0-9$_\\.\\+!\\*\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)?(?# fragment
)$/i';
}