Yes, I'd go with the function. I don't like LIKE because of the bigger
string issue. 12345678923 becoming ++++++++++ and that would be a valid
hit with a LIKE. And, without LIKE, it's hard to omit all non plusses and
do a simple equal.
For x=1 to %len(text);
when %subst(text:x:1) >='0' and %subst(text:x:1)<='9';
when y=9; first non digit after a string of 9 digits
other; not a digit and y<>9
' We hit end of field. If y wasn't 9 then clear out bankAccount.
If BankAccount<>' ';
Desk check that with a 12 character field with these values:
'123456789 ': Y hit 9, hit a non digit and broke out of loop. Valid
' 123456789': end of field and y=9. Valid
' 123456789 ': y hit 9, hit a non digit and broke out of loop. Valid
'a123456789bc': y hit 9, hit a non digit and broke out of loop. Valid
'abc123456789': end of field and y=9. Valid
'12345 6789': y got up to 5 then reset itself. Only got back up to 4.
'123456789012'; y>9; invalid