Dieser Java -Code sollte genauso verhalten: < /p>
Code: Select all
Pattern regex = Pattern.compile("(?u)\\b\\w\\w+\\b");
Matcher matcher = regex.matcher("this is the document.!? äöa m²");
while(matcher.find()) {
String match = matcher.group();
System.out.println(match);
}
< /code>
, aber dies erzeugt nicht die gewünschte Ausgabe, wie in Python: < /p>
this
is
the
document
äöa
m²
< /code>
Es gibt stattdessen aus: < /p>
this
is
the
document