SIMPOL Documentation

ismatchingpattern()

Description

This function compares the string passed in s against the pattern. The pattern consists of either "A" for alpha characters, "9" for digits, and otherwise the character in the pattern must match the character in the input string. For example: "999-99-9999" would match a US Social Security number. The UK postcodes system has 6 patterns: "AA9A 9AA", "A9A 9AA", "A9 9AA", "A99 9AA", "AA9 9AA", "AA99 9AA", and each pattern is valid with or without the space, so either each would need to be checked twice, or the space could be extracted first and removed from the patterns.

Prototype

ismatchingpattern ( string s, string pattern, boolean partialmatchok )

Parameters

ParameterDefault valueType nameDescription
sNonestring
patternNonestring
partialmatchok.falseboolean