2016-03-02 36 views

回答

0

下面是使用RegexBuddy使用检查。

(\b(https?|ftp|file)://)?[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|] 

它匹配下面这些(在**标记内):

**http://www.regexbuddy.com** 
**http://www.regexbuddy.com/** 
**http://www.regexbuddy.com/index.html** 
**http://www.regexbuddy.com/index.html?source=library** 

我发现这个博客非常有用的,你应该看看:

http://flanders.co.nz/2009/11/08/a-good-url-regular-expression-repost/

相关问题