Java code String regex="(?s).*?<li>用户名(.*?)</li>"; Matcher m=Pattern.compile(regex).matcher(yourString);while(m.find()){ System.out.println(m.group(1)); }
为什么要用正则了,,,用字符串截取很好啊,,,
String regex="(?s).*?<li>用户名(.*?)</li>"; Matcher m=Pattern.compile(regex).matcher(yourString); while(m.find()){ System.out.println(m.group(1)); }
62,614
社区成员
307,327
社区内容
加载中
试试用AI创作助手写篇文章吧