📅  最后修改于: 2022-03-11 14:58:53.248000             🧑  作者: Mango
final Pattern pattern = Pattern.compile("(.+?) ", Pattern.DOTALL);
final Matcher matcher = pattern.matcher("String I want to extract ");
matcher.find();
System.out.println(matcher.group(1)); // Prints String I want to extract