Какую регулярность может соответствовать похожим персонажам, таким как (ä и a) или на русском языке (и и й)?
ниже моего кода ... < /p>
Sting text1 = " Passagiere noch auf ihr fehlendes Gepäck"
Sting text2 = " Passagiere noch auf ihr fehlendes Gepack"
Pattern p1 = Pattern.compile("\\b" + "Gepack");
Pattern p2 = Pattern.compile("\\b" + "Gepack");
Matcher m1 = p1.matcher(text1); // doesn't find any occurrence
Matcher m2 = p2.matcher(text2) // founds one occurrence
Подробнее здесь: https://stackoverflow.com/questions/550 ... characters