Syntax:
$[m,pattern,string]
In this transformation, NMAKE32 will return those words in string which match the filename pattern specified by pattern. The matching is case-insensitive.
A filename can contain one or more of the following patterns:
To remove the special meaning of the characters {, }, \, ., *, ^, and !, if they are part of the filename to be matched, precede them with a backslash. If the dollar ($) character is used in a pattern, it must be preceded by a caret (^) character so that it will not be interpreted as a macro. The characters [, ], and comma (,) cannot be used in pattern matching.
Enclosed characters can be combined with ranges. Therefore, [ABCM-Z]* matches any filename that begins with A, B, C, or M through Z.
Examples:
The following transformation:
$[m,*.c,x.c a.h b.h c.h]
returns:
x.c
Since string can include macros as well as text, a transformation macro can be used to easily extract dependents with a particular extension. If the following line was in a description file:
my.obj: my.c a.h b.h c.h
The macro:
$[m,*.c,$**]
returns:
my.c