replace bracket - Android java.lang

Android examples for java.lang:String Replace

Description

replace bracket

Demo Code

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main{

    public static String replaceCode_bracket(String text) {
        text = null == text ? "" : text;
        return text.replaceAll("\\[", "").replaceAll("\\]", "")
                .replaceAll("\"", "");
    }// ww w . j  a v a 2s . c o  m

}

Related Tutorials