Simple question about regexps. I've got
String text = "foobar1foobar1";
And I need to get part before first 1 (foobar) When I do something like that:
Pattern date_pattern = Pattern.compile("(.+)1");
Matcher matcher = date_pattern.matcher(text);
matcher.group(1);
But I recieve "foobar1foobar".