Skip to content
Advertisement

Tag: delimiter

How to properly split on a non escaped delimiter?

I have the following example string: with | being the delimiter and being the escape character. A proper split should look as follows: Also I need this logic to be generally applicable in case the delimiter or the escape consists out of multiple characters. I already have a regex which splits at the correct position, but it does not

Java CSV parser with string separator (multi-character)

Is there any Java open source library that supports multi-character (i.e., String with length > 1) separators (delimiters) for CSV? By definition, CSV = Comma-Separated Values data with a single character (‘,’) as the delimiter. However, many other single-character alternatives exist (e.g., tab), making CSV to stand for “Character-Separated Values” data (essentially, DSV: Delimiter-Separated Values data). Main Java open source

Advertisement