开发技术备忘

来源:互联网 发布:数据库系统教程王能斌 编辑:程序博客网 时间:2024/04/28 13:15

查看数据库版本
select @@version


今天和明天日期
java.text.SimpleDateFormat format = new java.text.SimpleDateFormat("yyyy-MM-dd");
Calendar cal = Calendar.getInstance();
String dateString = format.format(Calendar.getInstance().getTime());
cal.add(Calendar.DAY_OF_MONTH, +1);
String tomorrowStr = format.format(cal.getTime());


判断是否包含汉字正则
String regEx = "[\\u4e00-\\u9fa5]";
Pattern p = Pattern.compile(regEx);    
Matcher m = p.matcher(resclerkStr);
m.find() --是否匹配

原创粉丝点击