How to remove empty results after splitting with regex in Java?

前端 未结 7 1609
臣服心动
臣服心动 2021-01-17 16:02

I want to find all numbers from a given string (all numbers are mixed with letters but are separated by space).I try to split the input String but when check the result arra

7条回答
  •  南笙
    南笙 (楼主)
    2021-01-17 16:14

    You may try this:

    reg.split("asd0085 sa223 9349x").replace("^/", "")
    

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题