how to make regular expression match only Cyrillic bulgarian letters

后端 未结 3 664
夕颜
夕颜 2021-02-14 13:06

Hello I want to replace all the letters from bylgarian alphabet with empty string I\'ve seen this link How to match Cyrillic characters with a regular expression but it doesn\'

3条回答
  •  孤城傲影
    2021-02-14 13:51

    Another way:

    Pattern.compile("[А-я]+", Pattern.UNICODE_CHARACTER_CLASS).matcher(strInput ).replaceAll("") ;
    

    Where [А-я]+ is your alphabet.

提交回复
热议问题