3 of 3 people found this helpful
ISO/IEC 7813 standard uses a number of special characters to delimit the data:
^ is the field separator,
% is the beginning of the row
? is the end of the row
/ divides the name field.
You can "explode" the single block of data into a return delimited list like so:
Substitute( CARD_DATA ; ["^" ; "¶"] ; ["%" ; "¶"] ; ["?" ; "¶"] ; ["/" ; "¶"] )
And you'll be left with a return delimited list of the magstripe data.
Then just use the GetValue() function to get what you need.
Last Name = GetValue ( NEW_LIST ; 2 )
First Name = GetValue ( NEW_LIST ; 3 )
Expiration YearMonth = Left ( GetValue ( NEW_LIST ; 4 ) ; 4 )
Card number = Right ( GetValue ( NEW_LIST ; 1 ) ; 16 )
The full specification is here:
If you want to write a custom function, should be pretty easy.
Thanks Mike. I will give that a try.