arrays - How to split string by character with exceptions (Java) -


i want process csv file. there problems processing it:

i need split lines every ; i'd use .split method btu in case there exceptions:

a line can have empty "cells" x;y;z;;a;;;b still need empty ones in array. example

array[0] = "x"; array[1] = "y"; array[2] = "z"; array[3] = ""; 

and on. exception is: there 1 cell contains html code (which has ";" in it). string shouldn't split if ; between "". there way handle this?

parsing data of form common problem, , has been solved csv parsers. use apache commons csv , change delimiter ; instead of default ,.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -