Here you can find the source of isNumString(String txt)
public static boolean isNumString(String txt)
//package com.java2s; //License from project: LGPL import java.util.regex.Pattern; public class Main { public static boolean isNumString(String txt) { return isEqualsFormat("^\\d+(,\\d+)*$", txt); }/*from www. j a v a 2 s .c om*/ public static boolean isEqualsFormat(String regex, String txt) { return txt != null && Pattern.matches(regex, txt); } }