Java tutorial
//package com.java2s; //License from project: LGPL import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { static Pattern number_pattern = Pattern.compile("^[0-9 \t\\n,\\.]+$"); public static boolean shouldBeTranslated(String s) { if (s.isEmpty()) return false; if (s.trim().isEmpty()) return false; Matcher matcher = number_pattern.matcher(s); if (matcher.matches()) return false; return true; } }