Previous | Contents | Index |
Test a mapping wildcard pattern.
pmdf test -match
Command Qualifiers Defaults None. None.
None.
Pattern: mapping-pattern Target: target-string
None.
pmdf test -match
may be used to test a mapping pattern, particularly, to test wildcard and glob matching.When invoked,
pmdf test -match
prompts 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 -match
will loop, prompting for input, until exitted with a CTRL/D (UNIX) or CTRL/Z (NT).
% pmdf test -match Pattern: $[ax1]*@*.example.com [ 1S] cglob [1ax] [ 2] "@" [ 3S] glob, req 109, reps 2 [ 4] "." [ 5] "a" [ 6] "c" [ 7] "m" [ 8] "e" [ 9] "." [ 10] "c" [ 11] "o" [ 12] "m" Target: xx11a@sys1.example.com Match. 0 - xx11a 1 - sys1 Pattern: $[ax1]*@*.example.com [ 1S] cglob [1ax] [ 2] "@" [ 3S] glob, req 109, reps 2 [ 4] "." [ 5] "a" [ 6] "c" [ 7] "m" [ 8] "e" [ 9] "." [ 10] "c" [ 11] "o" [ 12] "m" Target: 12a@node.example.com No match. Pattern: $[ax1]*@*.example.com [ 1S] cglob [1ax] [ 2] "@" [ 3S] glob, req 109, reps 2 [ 4] "." [ 5] "a" [ 6] "c" [ 7] "m" [ 8] "e" [ 9] "." [ 10] "c" [ 11] "o" [ 12] "m" Target: 1xa@node.example.com Match. 0 - 1xa 1 - node Pattern: ^D % |
In the above UNIX example, the sample mapping pattern
$[ax1]*@*.example.com
is tested for several sample target strings.
C:\> pmdf test -match Pattern: $(1.2.3.0/24) [ 1S] ipv4 [1.2.3.0/255.255.255.0] Target: 1.2.3.4 Match. 0 - 1.2.3.4 Pattern: $(1.2.3.0/24) [ 1S] ipv4 [1.2.3.0/255.255.255.0] 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.
Previous | Next | Contents | Index |