不清楚
好像与正则表达式有关,看看api文档吧。

解决方案 »

  1.   

    正则表达式,
    Pattern p1 = Pattern.compile("UTF-8"); 是正则语句
    Matcher m1 = p1.matcher("");要解析的字符串
      

  2.   

    正则表达式,在字符串解析的时候用
    import java.util.regex.*;
    public class b{
    public static void main(String[] agag){
    Pattern p=Pattern.compile("[l]");\\正则表达式
    String s="hello world";\\被解析的字符串
    Matcher m=p.matcher(s);
    System.out.println(m.replaceAll("o"));
    }
    }