public static boolean isNumeric(String str)
{
Pattern pattern = Pattern.compile("\\d+\\.?\\d+");
Matcher isNum = pattern.matcher(str);
if( !isNum.matches() )
{
System.out.println("not");
return false;
}
System.out.println("yes");
return true;
}