I have a variable with the following content:
10
20 30
40 50 60
70 80 90
100
There are spaces (may have 2 or more followed) and line breaks (also several in the sequence), and I want to substitute to stay this way:
10
20
30
40
50
60
70
80
90
100
Each value in a row, with no empty rows and no spaces.
I have tried conteudo = conteudo.replace(" ", "\n");
but empty lines remain.
Can you replace everything at once or clean these empty lines after breaking all values?