jEdit uses glob patterns similar to those in the various Unix shells to implement file name filters in the file system browser. Glob patterns resemble regular expressions somewhat, but have a much simpler syntax. The following character sequences have special meaning within a glob pattern:
? matches any one character
* matches any number of characters
{!
Matches anything that does not match
glob}glob
{
matches any one of a,b,c}a, b or
c
[ matches
any character in
the set abc]a, b or
c
[^ matches
any character not
in the set abc]a, b or
c
[ matches
any character in the
range a-z]a to z, inclusive.
A leading or trailing dash will be interpreted literally
In addition to the above, a number of java.util.regex “character class metacharacters” may be used, but their usefulness is limited since the regex quantifier metacharacters (asterisk, questionmark, and curly brackets) are redefined to mean something else in glob language.
\w matches any alphanumeric
character
\s matches a space or horizontal tab
\d matches a decimal digit
\S matches a non-space, non-control character
Here are some examples of glob patterns:
* - all files.
*.java - all files whose names end with
“.java”.
*.[ch] - all files whose names end
with either
“.c” or “.h”.
[^#]* - all files whose names do not
start with “#”.