The Pattern Matching Method is a pattern and wildcard matching routine. The first record is the pattern record and the second record is the file record. For example if the first record to be matched is
JOHN*
and the second is
JOHNNY
then the Score returned will be 100%.
The special wildcard characters in the pattern are,
* -- means match anything, for example * matches JOHN.
? -- match any one character, for example J? matches JO but not JOE.
() -- means match any of the characters inside the brackets.
An example is the pattern,
J* SM(IY)TH?
matched against the file record,
JOHN SMYTHE
The pattern character
J
matches the file record character
J
. The * matches the characters
OHN
. The two spaces match. The
SM
matches the
SM
in the file record. The Y in the file record matches the
Y
between the ( and ). The
TH
in the pattern matches the TH in the file record and finally the
?
matches the
E
in the file record.
The above example shows how
N3SCF
works but not really why you would use it. If all you wanted was the
J SMITH
s a retrieval based on the Name-key would suffice. But what if you want all the
J SMITH
s that live in a particular geographic area. You would retrieve a set of candidates using the Name-key, then match the telephone area code, against a pattern like,
21(12345)
This will filter those candidates with an area code of 211, 212, 213, 214 or 215.