util.TextMatchesFormat ( text_to_match ; format )
Determines if text_to_match is in the format specified
Be the first to rate this function Log in to vote
Pip Meadway - Show more from this author
PIPCO IT |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This is a simple format matching CF, for more complex formatting I would suggest using BERegularExpression () from Base Elements plug-in.
The format parameter can be a combination of literal text and placeholders for types of characters:
n any number
a any letter, upper or lower case
A-Z The specific letter, upper or lower case
_ A space
? Any character
Some examples:
a six digit number "nnnnnn"
six digits with a trailing alpha "nnnnnna"
I developed this to detect and format UK phone numbers, and I have tested it on c. 30,000 phone numbers.
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.