@WILD[string1,string2] : Compare deux chaînes de caractères et renvoie 1 si elles correspondent ou 0 si elles ne correspondent pas. Cette fonction détermine si la chaîne 1 correspond ou non au modèle spécifié dans la chaîne 2, qui peut contenir des caractères génériques ou des caractères génériques étendus. Aucun caractère générique n'est autorisé dans la chaîne1. Le testn'est pas sensible à la casse ( ).
Exemples
Les exemples ci-dessous supposent que la variablePATH contient :
c:\Nwindows;c:\Nwindows\Nsystem32 ; "c:\Nprogram files\Nutil";d:\Njpsoft
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 |