Regular Expression

~((?:https?|ftp)://)?[\w-]+(?>\.[\w-]+)+(?>[.,]*(?>[\[email protected]?^=%/\~+#;-]+|&(?:amp;)?)+)*~