F
Francisco Martinez
Hi...I'm trying to solve a very simple exercise but this is one of my
first tasks and I can't manage to find a solution.
I have a txt file and I have to write a method which; given the txt file
as an entry argument returns an array of tokens. I have to call the
method that prints the solutin in the screen.
The solution should be this type:
token 1= The
token 2= man
token 3= was
The starting txt file is a normal text...the only thing is that each
word or diacritic simbol is separated from a space to the other one. I
suppose I have to solve the problem with a regular expression but for
example I don't know how to punt words in the array and how to put them
one per line as the solution shows.
Some suggestion????
Thanks
first tasks and I can't manage to find a solution.
I have a txt file and I have to write a method which; given the txt file
as an entry argument returns an array of tokens. I have to call the
method that prints the solutin in the screen.
The solution should be this type:
token 1= The
token 2= man
token 3= was
The starting txt file is a normal text...the only thing is that each
word or diacritic simbol is separated from a space to the other one. I
suppose I have to solve the problem with a regular expression but for
example I don't know how to punt words in the array and how to put them
one per line as the solution shows.
Some suggestion????
Thanks