java用正则匹配中文中括号,和英文中括号

xiaoxiao2021-02-28  124

String regex = "(?<=\\[)(\\S+)(?=\\])|(?<=【)[^】]*"; Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(sss.get(i)); while (matcher.find()) {matcher.get(0)}
转载请注明原文地址: https://www.6miu.com/read-34200.html

最新回复(0)