Extended Regular Expressions 与 Basic Regular Expressions 的区别:
[url]http://www.gnu.org/software/sed/manual/html_node/Extended-regexps.html[/url]
[b]配置中常见的 ** * ? 等通配符:[/b]
在maven pom.xml中(如<assembly><fileSets>中做文件匹配)、Spring applicationContext。xml 中,都经常会碰到这三种通配符:
[url]http://www.sonatype.com/books/mvnref-book/reference/assemblies-sect-controlling-contents.html[/url]
[url]http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/core/io/support/PathMatchingResourcePatternResolver.html[/url]
[url]http://static.springsource.org/spring/docs/3.0.0.M3/reference/html/ch05s07.html[/url]
[url]http://stackoverflow.com/questions/8532929/two-asterisks-in-file-path[/url]
[color=red][b]** - matches one or more directories,匹配一个或多个目录
* - matches zero or more characters,匹配(文件名中的)0个或多个字符
? - matches exactly a single character,匹配(文件名中的)单个字符[/b][/color]
[b]
Sources:
java.util.regex.Pattern:
[url]http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[/url]
Java Tutorials - Lesson: Regular Expressions
[url]http://docs.oracle.com/javase/tutorial/essential/regex/[/url]
Java Regex Tutorial:
[url]http://www.vogella.com/articles/JavaRegularExpressions/article.html[/url]
Java - Regular Expressions:
[url]http://www.tutorialspoint.com/java/java_regular_expressions.htm[/url]
Java正则表达式详解
[url]http://sunnychuh.iteye.com/blog/715435[/url][/b]
[url]http://www.gnu.org/software/sed/manual/html_node/Extended-regexps.html[/url]
[b]配置中常见的 ** * ? 等通配符:[/b]
在maven pom.xml中(如<assembly><fileSets>中做文件匹配)、Spring applicationContext。xml 中,都经常会碰到这三种通配符:
[url]http://www.sonatype.com/books/mvnref-book/reference/assemblies-sect-controlling-contents.html[/url]
[url]http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/core/io/support/PathMatchingResourcePatternResolver.html[/url]
[url]http://static.springsource.org/spring/docs/3.0.0.M3/reference/html/ch05s07.html[/url]
[url]http://stackoverflow.com/questions/8532929/two-asterisks-in-file-path[/url]
[color=red][b]** - matches one or more directories,匹配一个或多个目录
* - matches zero or more characters,匹配(文件名中的)0个或多个字符
? - matches exactly a single character,匹配(文件名中的)单个字符[/b][/color]
[b]
Sources:
java.util.regex.Pattern:
[url]http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[/url]
Java Tutorials - Lesson: Regular Expressions
[url]http://docs.oracle.com/javase/tutorial/essential/regex/[/url]
Java Regex Tutorial:
[url]http://www.vogella.com/articles/JavaRegularExpressions/article.html[/url]
Java - Regular Expressions:
[url]http://www.tutorialspoint.com/java/java_regular_expressions.htm[/url]
Java正则表达式详解
[url]http://sunnychuh.iteye.com/blog/715435[/url][/b]