/^(https?|ftp|file):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]$/
/^ 是指开头的意思
$/ 是结尾的意思
两者中间是正则匹配