Hi All,
I have a requirement in which i have to get only the numeric values from a string , which consistes of numeric as well as other characters.Eg: String is "A123-6S". From this i want only 1236. i.e, only the numeric part.
In Server edition we used OConv(String,"MCN") which gave only the numeric values.Here in EE , which conversion function can exactly give only numeric values.?
Thanks in advance
Jm
Conversion function
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 7
- Joined: Tue Jul 24, 2007 4:08 am
- Location: Bangalore
-
- Participant
- Posts: 7
- Joined: Tue Jul 24, 2007 4:08 am
- Location: Bangalore
Thanks for the response..But here i need to remove all kind of alphabets and other symbols(like ., - , _ etc) from the string. We are not sure about the knd of characers present in the string. That is why here if we use the Convert function, the from list and replace list are not clear..
Please give more input..Any other function by which the conversion can be done easily..
Regards
Jm
Please give more input..Any other function by which the conversion can be done easily..
Regards
Jm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
For starters, stop thinking like a server developer.
You will have to create your own function. Test each character and, if its value falls between 48 and 57 inclusive append that character to the initially empty result variable.
You will have to create your own function. Test each character and, if its value falls between 48 and 57 inclusive append that character to the initially empty result variable.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.