Any Help would be greatly appreciated
I need a way to find a number after either one space, or two.
Ex: Number1: 555 <---one space
Ex2: Number1: 666 <---two spaces
I know how I could do each one independantly, but Id need it all in one code.
This code will find the number 555 in the first scenerio (one space) but wont work for the second scenerio (with two spaces):
PS: how do I format using .net?
I need a way to find a number after either one space, or two.
Ex: Number1: 555 <---one space
Ex2: Number1: 666 <---two spaces
I know how I could do each one independantly, but Id need it all in one code.
This code will find the number 555 in the first scenerio (one space) but wont work for the second scenerio (with two spaces):
Code:
Position1 = InStr(FirstString, "Number1: ") finds start position by finding "Number1: "
EndPosition = InStr(Position1 + 9, FirstString, " ") finds end position by finding the space after the number: (use +9 because the word "Number1: " is 9 characters)
Label1.Text = Mid(FirstString, Position1 + 9, EndPosition - Position1 - 9) inbetween start and end is the number
PS: how do I format using .net?