Java: removing numeric values from string

前端 未结 7 1904
心在旅途
心在旅途 2020-12-01 18:03

I have suceeded with the help of this community in removing numeric values from user input, however, my code below will only retrieve the alpha characters before the numeric

7条回答
  •  孤城傲影
    2020-12-01 18:32

    Your regular expression [^A-Z] is currently only configured to preserve upper-case letters. You could try replacing it with [^A-Za-z] to keep the lower-case letters too.

提交回复
热议问题