I reworked your pipe a little bit. I'm not familiar with localized titles, but it appears that "komm." is a suffix rather than a name, so I built an exception into the end of the regex for that.
The rule should look like:
replace ^.* ([^ \.]+)( komm\.)?$
with $1
The $1
is a backreference to the first matched group ([^ \.]+)
. The matching group matches the last continuous set of characters that are not a space or period.
This form was necessary because the regex will run in a Javascript environment, and Javascript does not handle non-ascii characters like ü
properly (it considers it a non-word).
It also has the ( komm\.)?
at the end so that it can ignore that suffix, if present.
Beyond that, I made a couple of changes to clean up the output so it's a little more legible.