July 2012
Intermediate to advanced
496 pages
16h 42m
English
Glob patterns are used by the Java 7 NIO.2 libraries for applying filters when iterating over directories and other similar tasks, as seen in chapter 2.
Glob patterns are simpler than regular expressions and follow the basic rules shown in table B.1.
|
Syntax |
Description |
|---|---|
| * | Matches zero or more characters. |
| ** | Matches zero or more characters across directories. |
| ? | Matches exactly one character. |
| {} | Delimits a collection of subpatterns to match with an implicit OR for each pattern; e.g. matches pattern A or B or C etc. |
| [] | Matches a single set of characters, or if a hyphen (-) character is used, matches a range of characters. |
| \ | Escape character; ... |
Read now
Unlock full access