commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-860) String split with an escape pattern
Date Tue, 27 Nov 2012 16:22:05 GMT

    [ https://issues.apache.org/jira/browse/LANG-860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13504725#comment-13504725
] 

Gary Gregory commented on LANG-860:
-----------------------------------

Hello,

The question for me is: How can Commons-CSV be made better if it cannot handle your user story.


It is possible that your story is out of scope for CSV of course.

"For example, what if you want to get all the parenthesized text out of a document? commons-csv
cannot do that because '(' and ')' are different characters. "

That's more Regex than CSV. Can you give an example of this story with your code? 

WRT "Also, if you expect anybody to use commons-csv, you should really put it on the central
maven repository, and document it a little more."

[CSV] is under development toward a 1.0 release at this time, which is why it is not on Maven
Central. Any and all help is appreciated to move [cvs] forward. Please see the ML for a discussion
of the configuration API where we seems to be balancing between two styles.
                
> String split with an escape pattern
> -----------------------------------
>
>                 Key: LANG-860
>                 URL: https://issues.apache.org/jira/browse/LANG-860
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>            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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message