Brian Dunning's FileMaker Custom Functions

jGetMask ( string )

Will return the 'mask' of a string

  Average rating: 4.7 (17 votes) Log in to vote

John Buckingham   John Buckingham - Show more from this author
microGuidance
http://microguidance.co.uk

Share on Facebook Share on Twitter

  Sample input:
WC1A 1AZ
S8 SEW
Y011 OSN
  Sample output:
AA9AS9AA
A9SAAA
A999SAAA

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Will return the 'mask' of the string sent to it. The mask will contain:
'S' for a Space ' '
'9' for any number
'A' for any character (upper or lower case)
'P' for any character other than detailed above

Used to assist in resolving badly formed UK postcodes

Examples:
WC1A 1AZ -> AA9AS9AA
S8 SEW -> A9SAAA
Y011 OSN -> A9AASAAA

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: