java
ltz82307
喜欢JAVA,C,C ,visual c#,ActionScript3.0,flex
展开
-
取得本机IP地址,本机名
写道 /**取得本机的主机名,ip地址**/ try{ InetAddress ipa = InetAddress.getByName("localhost"); System.out.println("Host name: " + ipa.getHostName()); System.out.prin...原创 2012-03-02 15:07:04 · 151 阅读 · 0 评论 -
正表达式区分大写字母,小写字母,数字,汉字
String str = "我你la123BBcc你你"; String reg_character = "([A-Z]*)([a-z]*)([0-9]*)([\u4E00-\u9FA5]*)"; Pattern p =Pattern.compile(reg_character); Matcher m = p.matcher(str); StringBuilder...原创 2012-03-02 15:55:01 · 249 阅读 · 0 评论