There is a CSV view

1;2;3;4;"abc.com/d=e;q;w;e" 

To break a string, I take ";" as a character, but since In url this sign is present, then I get an incorrect result. The csv is big enough and it is expensive to process by characters. Is there any thread way? now I read line by line and do stroka.split (";"), how do I create a regular expression that takes quotation marks into account?

  • one
    Why do you think that the use of regulars is cheaper than manual character-by-character parsing? - avp pm
  • in any case, I will save time on manual implementation - Alex
  • one
    I googled for you: stackoverflow.com/questions/366202/… - Boris Ustyantsev

1 answer 1

The CSV format is not as simple as it seems at first glance.

The easiest way to take a ready library for parsing. For example opencsv

  • Yes, I did, but thanks anyway. - Alex