shell_match
shell_match — compares string text to a pattern.
shell_match (text, pattern)
textA text string to compare against the given pattern.
patternA shell style pattern.
This function compares the text to the
pattern using shell-style wildcard rules. The
available patterns are as follows:
* matches any number of characters, including zero.
[c] matches a single character which is a member of the set contained within the
square brackets.
[^c] matches any single character which is not a member of the set contained within
the square brackets.
? matches a single character.
{xx,yy} matches either of the simple strings contained within the braces.
\c (a backslash followed by a character) - matches that character.
To get a directory listing of just *.txt files, use:
shell_match(directory("/etc/readme",0,nil),"*.txt");Gamma>shell_match("hello","?el[a-m]*");tGamma>shell_match("hello","hel{p,m,ga}");nilGamma>