Glob Pattern Search - rsanchez-wsu/jfiles GitHub Wiki

Source and more info available at: http://javapapers.com/java/glob-with-java-nio/

Glob pattern searches work very similar to regex. By using special characters, a Glob pattern can find results that partially match the pattern.

* = Wildcard character representing any set of characters appearing 0 or more times
eg JFiles* matches anything beginning with JFiles. JFilesClient, JFilesServer, etc.

? = Wildcard character representing a single character.
eg File1?.txt will match results like File12.txt, File1a.txt, File10.txt, etc.

[ ] = Represents a set of possible single characters.
eg. f[aio]x will only match fax, fix, or fox.

{ } = Represents a set of possible strings separated by commas.
eg. *.{txt,png} will match any text or png files.

! = Used for negation.
eg. *{!.txt} will match any files except text files