Show/Hide Toolbars

Take Command / TCC Help v. 21

@WILD[string1,string2] :  Compares two strings and returns 1 if they match or 0 if they don't match. This function determines whether or not string1 matches the pattern specified in string2, which may contain wildcards or extended wildcards. No wildcards are permitted in string1. The test is not case sensitive.

 

Examples

 

The examples below assume that the PATH variable contains:

 

c:\windows;c:\windows\system32;"c:\program files\util";d:\jpsoft

 

 

string1

string2

match condition

result

%path

*\UTIL*

string \util anywhere

1

%path

*c

string ending with c

0

%path

*t

string ending with t

1

%path

c*

string starting with c

1

%path

t*

string starting with t

0

%path

*c*

string containing c

1

%path

*t*

string containing t

1

%path

*b*

string containing b

0

xyz

?

one character long string

0

x

?

one character long string

1

%path

c?*

leading c, followed by any one character, followed by 0 or more characters

1

%path

c*?

leading c, followed by zero or more characters, followed by any one character

1