I'm implementing a filter for russian swearwords and my head is gonna explode. Is there any regexp for matching all cyrillic characters in a word except the first and the last one? \\B\\w\\B
doesn't work on cyrillic alphabet. RegExp will be used in replaceAll()
. [ёа-я]+
is good for matching russian words, but I still need to exclude first and last character.
Test Input: ОченьПлохоеСлово
Output: О**************о