use*_*196 1 java regex matcher
关于regexp的简单问题.我有
String text = "foobar1foobar1";
Run Code Online (Sandbox Code Playgroud)
我需要在第一个之前获得一部分(foobar)当我做这样的事情时:
Pattern date_pattern = Pattern.compile("(.+)1");
Matcher matcher = date_pattern.matcher(text);
matcher.group(1);
Run Code Online (Sandbox Code Playgroud)
但我收到"foobar1foobar".