This class is a different form of Regex designed to work more
like the file matching utility of a Unix shell. It is implemented
by some simple string transformations:
Note that a FileRegex pattern always ends with the Regex
pattern element "$". If you like to experiment, try making
FileRegex's and then printing them out. The toString() method
does a decompile of the pattern to a standard Regex. Here are
some more complete examples:
Fields inherited from class COM.stevesoft.pat.Regex
public static java.lang.String list(java.lang.String f)
Provides an alternative to File.list -- this
separates its argument according to File.pathSeparator.
To each path, it splits off a directory -- all characters
up to and including the first instance of File.separator --
and a file pattern -- the part that comes after the directory.
It then produces a list of all the pattern matches on all
the paths. Thus "*.java:../*.java" would produce a list of
all the java files in this directory and in the ".." directory
on a Unix machine. "*.java;..\\*.java" would do the same thing
on a Dos machine.
public static java.lang.String toFileRegex(java.lang.String s)
This method takes a file regular expression, and translates it
into the type of pattern used by a normal Regex.