【开发日志-已归档】2020-12
【正则】截取字符串String reqUrl = "http://127.0.0.1:7550/daemon/api/v2/health/check?key=123"; String regex = "(?:https?://)?(.*?)(/.*?)(\\?[\\s\\S]*)?$"; Matcher m= Pattern.compile(regex).matcher(reqUrl); while (m.find()) { System.out.prin