You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2013/10/16 10:17:44 UTC
[jira] [Moved] (CSV-101) String split with an escape pattern
[ https://issues.apache.org/jira/browse/CSV-101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell moved LANG-860 to CSV-101:
----------------------------------------
Component/s: (was: lang.*)
Parser
Workflow: classic default workflow (was: Default workflow, editable Closed status)
Key: CSV-101 (was: LANG-860)
Project: Commons CSV (was: Commons Lang)
> String split with an escape pattern
> -----------------------------------
>
> Key: CSV-101
> URL: https://issues.apache.org/jira/browse/CSV-101
> Project: Commons CSV
> Issue Type: Improvement
> Components: Parser
> Reporter: Michael Knapp
> Priority: Minor
> Labels: patch, split
> Attachments: StringUtilsSplitEscapingly.patch
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.1#6144)