您的位置:首页 > 其它

判断每个字符串是否包含中文

2012-03-15 10:05 253 查看
String a="helll 你好你好,ddddd";

Pattern pattern=Pattern.compile("[\u4e00-\u9fa5]");

Matcher matcher=pattern.matcher(a);

//判断路径是否包含中文,就修改图片的名字

if(matcher.find()){

renameCircuitryPic(url, dirPaths, dirPath, service, tattment);

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: