omnisautnihil
New Member
- Joined
- May 13, 2011
- Messages
- 19
I am trying to write a very robust program for a template file I can upload for my company. I want the admin to be able to set a form for the entry values as such:
ANYTHING####
This program is to evaluate and fix the entries given by users who fail to follow the form. For example if the form says:
IVHMS34_SRS####
and the user enters: SRS140 or 720 or IVHMSSRS360
I want to fix them to say the corresponding correct form.
The problem is there are no rules. It can be any number of characters before the numbers and the numbers can be any length after the other characters. There is no deliniator that is set in stone. That form could say IVHMS_###.
I feel like the easiest way is to ask the admin for the string portion.
So my question is this: (Assuming counting from the right is the best approach) How would I find the end of the number portion to add the string portion. I know how to & things together but its finding the end of the number portion that is confusing me. (I really dont want to do a two level loop looking at each character to see if its the first non-number.)
ANYTHING####
This program is to evaluate and fix the entries given by users who fail to follow the form. For example if the form says:
IVHMS34_SRS####
and the user enters: SRS140 or 720 or IVHMSSRS360
I want to fix them to say the corresponding correct form.
The problem is there are no rules. It can be any number of characters before the numbers and the numbers can be any length after the other characters. There is no deliniator that is set in stone. That form could say IVHMS_###.
I feel like the easiest way is to ask the admin for the string portion.
So my question is this: (Assuming counting from the right is the best approach) How would I find the end of the number portion to add the string portion. I know how to & things together but its finding the end of the number portion that is confusing me. (I really dont want to do a two level loop looking at each character to see if its the first non-number.)