匹配URL链接
/(\b(https?|ftp|file):\/\/[a-z-A-Z0-9+&@#\/%?=~_|!:,.;{}]*[a-z-A-Z0-9+&@#\/%=~_|{}])/ig
示例:
'测试字符串https://editor.csdn.net到'.replace(/(\b(https?|ftp|file):\/\/[a-z-A-Z0-9+&@#\/%?=~_|!:,.;{}]*[a-z-A-Z0-9+&@#\/%=~_|{}])/ig,'<a href="$1" target="_blank">点击链接</a>')