Find and replace strings
Posted on 2011-02-22
I have a problem; I have a string called mystring as:
mystring = "ABC1254,ACB859,BCA9875"
I would like firstly to only get the first three characters of each item of mystring (each item is divided by a comma)
Then the result will be like this:
mystring = "ABC,ACB,BCA"
Finally, can I replace each item with its corresponding number? Such as:
So, the final result is:
mystring = "1,2,3"
Note: I am using vb.net 2010
Thanks in advance