Pattern matching guide
Fisheye supports a powerful type of regular expression for matching files and directories (same as the pattern matching in Apache Ant).
These expressions use the following wild cards:
? | Matches one character (any character except path separators) |
| Matches zero or more characters (not including path separators) |
| Matches zero or more path segments. |
Remember that Ant globs match paths, not just simple filenames.
- If the pattern does not start with a path separator i.e. / or \, then the pattern is considered to start with
/**/
. - If the pattern ends with
/
then**
is automatically appended. - A pattern can contain any number of wild cards.
Also see the Ant documentation.
Examples
*.txt | Matches |
/*.txt | Matches |
dir1/file.txt | Matches |
**/dir1/file.txt | Same as above. |
/**/dir1/file.txt | Same as above. |
/dir3/**/dir1/file.txt | Matches |
/dir1/** | Matches all files under |
/dir1* | Matches all files as /dir11 , /dir12 , /dir12345 and so on. |
/dir?? | Matches all files as /dir11 , /dir22 and so on, replacing just 2 characters. |