I am working on a particular automation and part of the process needs to validate a payment history field. This field is currently 96 characters long in string format and contains payment history for a particular account. The string could contain any number 0-9 as well as certain letters representing different statuses. An example portion of a string could be “00001230000111222223334000B” and any combination.
The thing I need is to look at each individual character in a string and confirm that the following number is at most one more than the current one or is a letter/less than. So for example this string “00012301112” would be valid but “00012366600” would not since it can not go from 3 to 6 in one position.
What is an easy way to do this since it is in string format?