Uploaded image for project: 'Commons CSV'
  1. Commons CSV
  2. CSV-101

String split with an escape pattern

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Review, 1.x
    • Component/s: Parser
    • Labels:

      Description

      Often times there are strings which are delimited, but certain patterns can escape the delimiter. For example, quotes are used in CSV to escape a comma delimiter. I have written a couple methods for StringUtils that split strings while considering the possibility of an escape pattern. For example, when given "a,\"b,c\",c", it will produce

      {"a","\"b,c\"","c"}

      . In my code, the delimiter can be a string, and it can be escaped by any regular expression pattern. Unit tests are already written and passing.

      I plan to attach the patch for this once the ticket is created. I just need a committer to review the patch, approve, and commit it for me.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              msknapp Michael Knapp
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified