Hi,
I'm trying to read a file with data seperated by "|" character.
Ex:
3578.27|2001|Ro ad Bikes|Metchosin |Canada
3399.99|2001|Mo untain Bikes|Pantin|Fr ance
3399.99|2001|Mo untain Bikes|Lebanon|U nited States
After reading the first line, I'm trying to split the string into an array by doing
However java see "|" as an alternation rather than a regex delimiter for my string.
And I cannot change the data file because it has over 3000 lines.
Regards,
Gordon
I'm trying to read a file with data seperated by "|" character.
Ex:
3578.27|2001|Ro ad Bikes|Metchosin |Canada
3399.99|2001|Mo untain Bikes|Pantin|Fr ance
3399.99|2001|Mo untain Bikes|Lebanon|U nited States
After reading the first line, I'm trying to split the string into an array by doing
Code:
String[] x = str.split("|");
And I cannot change the data file because it has over 3000 lines.
Regards,
Gordon
Comment