HDU1286 找新朋友
2013-06-30 16:49
246 查看
学习过程中随手写的一些测试的代码,记录下来以备日后查看
也希望能给别人些许的帮助
也希望能给别人些许的帮助
System.out.println(".-".matches("[.-]*"));// true System.out.println(".".matches("[.-]*"));// true System.out.println("".matches("[.-]*"));// true System.out.println("".matches("[\\w[.-]]*"));// true System.out.println("".matches("[\\w[.-]]+"));// false System.out.println("dfg_33.dd-ff@@".matches("[\\w[.-]]+@{1}"));// false System.out.println("dfg_33.dd-ff".matches("[\\w[.-]]+@{1}"));// false System.out.println("df@g_33.dd-ff@".matches("[\\w[.-]]+@{1}"));// false System.out.println("dfg_33.dd-ff@".matches("[\\w[.-]]+@{1}[\\w[.-]]+"));// false System.out.println("xxx_yy123-zz.hh@163." .matches("[\\w[.-]]+@{1}[\\w[-]]+.\\w+"));// false System.out.println("xxx_yy123zzhh@zh-logistics.com.cn" .matches("[\\w[.-]]+@{1}[\\w[.-]]+[.]\\w+")); System.out.println("xxx_yy123zzhh@zh-logistics.com.cn" .matches("[\\w[.-]]+@[\\w[.-]]+\\.\\w+"));
相关文章推荐
- HDU——1286找新朋友(欧拉函数+质数打表)
- HDU - 1286 F - 找新朋友
- HDU 1286 找新朋友
- HDU 1286 找新朋友【欧拉函数 最基础应用】
- 【HDU】-1286-找新朋友(欧拉函数)
- hdu 1286 找新朋友,欧拉函数
- Hdu 1286 找新朋友
- hdu 1286找新朋友 (简单数学题)
- hdu 1286 找新朋友
- HDU1286 找新朋友
- hdu-1286 找新朋友(欧拉函数,水题)
- hdu 1286-找新朋友
- hdu 1286 找新朋友
- HDU 1286 找新朋友(欧拉函数)
- HDU 1286 找新朋友
- HDU - 1286 - 找新朋友(欧拉函数)
- hdu 1286 找新朋友 欧拉函数
- HDU - 1286 找新朋友 欧拉函数入门
- hdu 1286找新朋友 (简单数学题)
- 找新朋友 HDU杭电1286 【欧拉函数】