We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public static List<String> fetchUsers(String str) { List<String> ats = new ArrayList<>(); String pattern = "@"; Pattern regex = Pattern.compile(pattern); Matcher regexMatcher = regex.matcher(str); while (regexMatcher.find()) { ats.add(regexMatcher.group(1)); } return ats; }
我测试了一下,这里会报一个No group 1的异常
String test = "@dd 1 @dd 2" BaseEntity.fetchUsers(test);
The text was updated successfully, but these errors were encountered:
修改了下正则 ,详见 2f0988a
Sorry, something went wrong.
另外https://github.com/tomoya92/pybbs/blob/master/src/main/java/cn/tomoya/common/BaseEntity.java#L26
这里的siteConfig为null吧,我这里获得的是一个null值
@LiHaoGit 才发现,@功能没有做处理,明天我看看吧
@tomoya92 我发了一个pr去掉@了,并且把过过滤html的配置了一下,使用相对地址
No branches or pull requests
我测试了一下,这里会报一个No group 1的异常
The text was updated successfully, but these errors were encountered: