比如:<meta http-equiv=Content-Type content="text/html;charset=gb2312">或者<meta http-equiv=Content-Type content=text/html;charset=gb2312>也或者<meta http-equiv=Content-Type content="text/html;charset=gb2312"/>这里有要一个通用的正则表达式,截取charset中的值String regx = ""; //这里正则怎么写? Pattern p = Pattern.compile(regx);Matcher m = p.matcher(body); System.out.println(m.replaceAll(""));