java正则表达式
来源:互联网 发布:名字作诗软件 编辑:程序博客网 时间:2024/06/03 06:18
//String regEx2=".+\\\\(.+)$";
//String str2="c:\\dir1\\dir2\\name.txt";
String regEx2="\\{(.+?)\\}";
String str2="c:\\dir1\\dir2\\test{name.txt11}atese";
Pattern p2=Pattern.compile(regEx2);
Matcher m2=p2.matcher(str2);
boolean rs2=m2.find();
System.out.println("Count="+m2.groupCount());
for(int i=1;i<=m2.groupCount();i++){
System.out.println(m2.group(i));
}
//String str2="c:\\dir1\\dir2\\name.txt";
String regEx2="\\{(.+?)\\}";
String str2="c:\\dir1\\dir2\\test{name.txt11}atese";
Pattern p2=Pattern.compile(regEx2);
Matcher m2=p2.matcher(str2);
boolean rs2=m2.find();
System.out.println("Count="+m2.groupCount());
for(int i=1;i<=m2.groupCount();i++){
System.out.println(m2.group(i));
}
- Java 正则表达式正则
- 【正则表达式】Java正则表达式
- 正则表达式 JAVA正则表达式
- 【Java】【正则表达式】正则表达式
- Java 正则表达式详解_正则表达式
- java正则表达式!正则表达式踩坑!!!
- 正则表达式工具类,正则表达式封装,Java正则表达式
- Java正则表达式详解
- Java正则表达式详解
- Java正则表达式详解
- Java正则表达式详解
- Java正则表达式详解
- java和正则表达式
- java正则表达式详解!
- Java正则表达式详解
- Java正则表达式详解
- Java正则表达式详解
- Java正则表达式详解
- Android adb shell大全
- memcmp和memset函数的用法
- linux驱动编写(Kconfig文件和Makefile文件)
- 第十四周上机实践项目——数组大折腾
- VS2012 编译支持Windows XP 的可执行文件
- java正则表达式
- (Relax ST1.18)POJ 3619 Speed Reading
- RS-232串行口连接线 com口连接线 并口链接线
- Android布局文件属性笔记
- centos6.4 安装chrome浏览器最新版
- Android crash特殊位置定位
- svn常用命令
- window7使用QC问题解决
- error C3861: 'round': identifier not found