Test a mapping wildcard pattern.
pmdf test -match
Command Qualifiers Defaults None. None.
None.
| Pattern: | mapping-pattern |
| Target: | target-string |
None.
pmdf test -matchmay be used to test a mapping pattern, particularly, to test wildcard and glob matching.When invoked,
pmdf test -matchprompts for a pattern and then for a target string to compare against the pattern, and will output whether or not the target string matched and if it did match, which characters in the target string matched which wildcard or glob of the pattern.pmdf test -matchwill loop, prompting for input, until exitted with a CTRL/D (UNIX) or CTRL/Z (NT).
% pmdf test -match Pattern: $[ax1]*@*.acme.com Target: xx11a@sys1.acme.com Match. 0 - xx11a 1 - sys1 Pattern: $[ax1]*@*.acme.com Target: 12a@node.acme.com No match. Pattern: $[ax1]*@*.acme.com Target: 1xa@node.acme.com Match. 0 - 1xa 1 - node Pattern: ^D %
In the above UNIX example, the sample mapping pattern
$[ax1]*@*.acme.comis tested for several sample target strings.
C:\> pmdf test -match Pattern: $(1.2.3.0/24) Target: 1.2.3.4 Match. 0 - 1.2.3.4 Pattern: $(1.2.3.0/24) Target: 1.2.8.0 No match. Pattern: ^Z C:\>
In the above NT example, the sample mapping pattern
$(1.2.3.0/24)is tested or two sample target strings.