I want to parse numbers in a line of a text file line by line. For example, imagine _ as a space
my text file content looks like:
___34_______45
_12___1000
____4______167
...
I think you got the idea. Each line may have variable number of spaces separating the numbers, meaning there is no pattern at all. The simplest solution could be read char by char and check if it is a number and go like that until the end of the number string and parse it. But there must be some other way. How can I read this in Java automatically so that I can get in a certain datastructure say array
[34,45]
[12,1000]
[4,167]