Java tutorial
//package com.java2s; public class Main { public static String unformatNumOrZero(String num) { try { num = num.replaceAll(",", ""); } catch (Exception e) { return "0"; } return num; } }