You could build up a character class of all the characters you want to match so you could replace pattern one with
Pattern p1 = Pattern.compile("\\b" + "Gep[aä]ck");
But this could get very burdensome very quickly
There is a mechanism in Unicode called Normalisation, see here for details, that lets you reformat your string to compare in different ways.
Normalisation Form Canonical Decomposition (NFD) takes a string containing accented character code points and creates multiple code points, starting with the base character and then with code points cosponsoring to combining character versions of the accents in a well defined order for each accented character.
Having done this to your input you can use a regex to remove all the accents from the string as they will all have the Unicode property Mark
, sometimes shortened to M
.
This gives you a string containing only base characters that your regex will match against.