Hi,
I have a file in the following format. Each Columns are separated by one or multiple spaces
Column A Column B Column C Column D
Text1 2 3 Text4
Text2 & Text 3 4 5 Text5 and Text6
what i have to do is to extract column C or any column .
I have the following regular expression which splits the file :
String[] data = line.split("\\s+");
However, The data in each columns can also contain spaces. This regex splits that also. How do i go about splitting columns, also preserving the spaces in each column.
Is there a way to do it or its not possible