从英文字符串中提取所有数字

 

    @Test
    public void getNumber(){
        String data = "The weather is good today and it is my 35th birthday";
        System.out.println(data.replaceAll("[a-zA-Z]", "").trim());
    }

 

You haven't logged in yetLogin OrRegisterAdd comments after
Popular Articles
Popular Tags
Java(22)
Recently published