>>51
あんまりきれいじゃないけど、こんなかんじ

public static String toPresentForm(String word) {
String ieAfterConsonant = "(\\w*[^aeiou])ie(d|s)";
String thirdPersonSingular = "(\\w*)(es|s)";
String normalPastForm = "(\\w*)ed";

if (word.matches(ieAfterConsonant)) {
return word.replaceFirst(ieAfterConsonant, "$1y");
} elseif (word.matches(thirdPersonSingular)) {
return word.replaceFirst(thirdPersonSingular, "$1");
} else if (word.matches(normalPastForm)) {
return word.replaceFirst(normalPastForm, "$1");
}
return word;
}