发布网友 发布时间:2022-04-25 11:02
共1个回答
热心网友 时间:2022-04-25 12:31
import java.util.regex.*; class q255394454 { public static void main(String[] args) { Pattern pattern = Pattern.compile("http://[\\w\\.\\-/:]+"); Matcher matcher = pattern.matcher("你的字符串,审核通不过"); StringBuffer buffer = new StringBuffer(); while(matcher.find()){ buffer.append(matcher.group()); buffer.append("\r\n"); } System.out.println(buffer.toString()); } }