正则表达式如下:
(http|ftp|https):\/\/([\w.]+\/?)\S*
Java代码中的判断如下:
Pattern pattern2 = Pattern
.compile("(http|ftp|https):\\/\\/([\\w.]+\\/?)\\S*");
Matcher matcher2 = pattern2.matcher(content);
正则表达式如下:
(http|ftp|https):\/\/([\w.]+\/?)\S*
Java代码中的判断如下:
Pattern pattern2 = Pattern
.compile("(http|ftp|https):\\/\\/([\\w.]+\\/?)\\S*");
Matcher matcher2 = pattern2.matcher(content);