You are here

function follow_network_regex in Follow 6

The default regex callback for a follow network. This simply returns a regular expression to be used in validating the saved url.

Parameters

$network_info: An array of data about this network.

Return value

A string, regular expression used to validate the submitted url.

1 string reference to 'follow_network_regex'
follow_url_validate in ./follow.module
Validates the url field to verify it's actually a url.

File

./follow.module, line 614
Allows users to add links to their social network profiles.

Code

function follow_network_regex($network_info) {

  // An external link.
  return '@^https?://([a-z0-9\\-_.]+\\.|)' . str_replace('.', '\\.', $network_info['domain']) . '/@i';
}