Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static String cleanBlankToString(String des) {
        char[] chars = des.toCharArray();
        StringBuffer sb = new StringBuffer();
        for (Character c : chars) {
            if (java.util.regex.Pattern.matches("\\d", String.valueOf(c))) {
                sb.append(c);
            }
        }
        return sb.toString();
    }
}