I need to change a sequence of numbers and non-numbers (groups of possibly 4 but not always) which are separated by dashes into another related sequence of only numbers (always length of 45 in groups of 5) but also separated by dashes.
One way of doing this by using the first sequence:
Change non-numbers into 2's (9244-2422-4324-6598)
Remove dashes (9244242243246598)
Add random number/s at end to make 45 characters (9244242243246598 + 594820880558382451476587923412)
Insert a dash after every 5 characters (92442-42243-24659-85948-20880-55838-24514-765879-23412)
You may know a better way. I need the code to do this. I am using Delphi 6. Your help would be greatly appreciated. Thanks.