Hi,
I have searched but can't seem to find exactly what I need to accomplish this simple task. I want to
1. Strip all leading spaces (could be any number of spaces) e.g. " 12345" or " 12345"
2. Strip all leading zeros (could be any number of zeros) e.g "012345" or "00012345" or " 012345"
3. Strip all spaces in the string (could be anywhere in the string and any number of spaces) e.g. "12 34 56 " or " 1"
4. Strip all Hyphens in the string (could be anywhere in the string and any number of hyphens)
I've managed to cobble this code together that does most of what I need but it wont handle the case where I have a leading space and a leading zero. (e.g. " 012345"). In this example the leading space gets removed but the zero doesn't. I've tried adding a "Trim" but I just can't get it to work.
What code do I need to add to remove the leading space where there is also a leading zero and where do I need to add it?
My Code
Bookmarks