I'm very new to c# and programming in general so I apologise if this doesn't make sense... I need to be able to search a textbox or combobox to read a notepad file containing many satellite two line element codes. The text file is set out like this:
0 VANGUARD 1
1 00005U 58002B 14242.42781498 .00000028 00000-0 24556-4 0 2568
2 00005 034.2497 271.4959 1848458 183.2227 175.4750 10.84383299975339
0 TRANSIT 2A
1 00045U 60007A 14245.43855606 .00000265 00000-0 95096-4 0 2208
2 00045 066.6958 193.0879 0251338 053.7315 060.2264 14.33038972819563
0 EXPLORER 11
1 00107U 61013A 14245.36883128 .00001088 00000-0 12832-3 0 1217
2 00107 028.7916 229.2883 0562255 219.9933 302.0575 14.05099145667434
Etc.
I need to search the box for the only satellite's name (the name after the 0 in the 'first' row) and extract that name into another textbox, and to use in my code. Additionally, I need to seperately extract the 2 lines of code directly beneath the name selected in the box (also to use in the code).
I have written code to use these two line elements, but I'm not able to automatically put them in my code.
Thank you
You can use regular expressions for this task.
(I assume that the letters/numbers block after the name is also part of the name)
This code will do the following:
Satellite
objectCode:
Result: