I want to return the part of each line that contains a dot between the numbers which is the GPA portion of each line from a text file.
I can figure out how to read each line in the text file and print it. I have tried using .contains
and .substring
to try to capture the portion I want from each line but I do not know how to do so.
1.wita7557 | william | tang | male | 3.0 | counselor | 5 | database | leader
2.tosm5791 | tommy | smith | male | 3.5 | mastermind | 5 | designer | leader
3.drco5905 | drew | collins | male | 3.7 | inspector | 3 | designer | programmer
so from the above code I would want an expected result into an array such as [3.0,3.5,3.7]