M
moondaddy
I'm writing an app in vb.net 1.1 and I need to parse strings that look
similar to the one below. All 5 rows will make up one string. I have a
form where a use can copy/paste data like what you see below from excel,
word, notepad, etc.. into a textbox on my form. I need to break each line
into 2 numbers which I'll use as parameters for another function. in all
cases each line will be separated with a vbNewline and in most cases the 2
numbers in the line (2483 and 21 for example) will be separate be a tab
space, but I cant guarantee that. It should however be some sort of white
space in-between the 2 numbers. I could split the string below into 5
smaller strings, but I'm short on a reliable way to consistently parse the 2
numbers from each string.
2483 21
2484 23
24853 3
2486 14
2487 5
the end result of what I want to do is parse this string where I can feed
each value into parameters like this
param1=2483 param2=21
param1=2484 param2=23
param1=24853 param2=3
param1=2486 param2=14
param1=2487 param2=5
any good recommendations?
Thanks
similar to the one below. All 5 rows will make up one string. I have a
form where a use can copy/paste data like what you see below from excel,
word, notepad, etc.. into a textbox on my form. I need to break each line
into 2 numbers which I'll use as parameters for another function. in all
cases each line will be separated with a vbNewline and in most cases the 2
numbers in the line (2483 and 21 for example) will be separate be a tab
space, but I cant guarantee that. It should however be some sort of white
space in-between the 2 numbers. I could split the string below into 5
smaller strings, but I'm short on a reliable way to consistently parse the 2
numbers from each string.
2483 21
2484 23
24853 3
2486 14
2487 5
the end result of what I want to do is parse this string where I can feed
each value into parameters like this
param1=2483 param2=21
param1=2484 param2=23
param1=24853 param2=3
param1=2486 param2=14
param1=2487 param2=5
any good recommendations?
Thanks