Here is code I have for a url validation function in CI, and this is the callback function
function valid_url($facebook)
    {
        $pattern = "/^((ht|f)tp(s?)\:\/\/|~/|/)?([w]{2}([\w\-]+\.)+([\w]{2,5}))(:[\d]{1,5})?/";
        if (!preg_match($pattern, $facebook))
        {
            return FALSE;
        }
        return TRUE;
    }     
I'm getting this error
Message: preg_match() [function.preg-match]: Unknown modifier '|'
 
     
    