日期:2014-05-20 浏览次数:20694 次
String ul = "123http://www.baidu.com测试 456"; String regex = "(?<=https?://).+?(?= |[\\u4e00-\\u9fa5])"; Matcher matcher = Pattern.compile(regex).matcher(ul); while(matcher.find()){ System.out.println(matcher.group()); }
------解决方案--------------------
(?i)https?://[^'">\s]+