Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How do I get String.split() to do what I want?

Reply
Thread Tools

How do I get String.split() to do what I want?

 
 
Roedy Green
Guest
Posts: n/a
 
      06-30-2004
On Wed, 30 Jun 2004 20:32:57 GMT, Alan Moore <(E-Mail Removed)>
wrote or quoted :

>But, as the others have said, this approach is much less efficient
>than a dedicated CSV parser. Regular expressions are just not the
>right tool for this job.


When you look at all the special cases in a CSV parser, it become
clear it would take a heck of a long regex to specify all those rules.

It is easier and faster to specify them as a simple state machine.
Further is it is much easier to just specify a single method call to
debugged code than create some Rube Goldberg contraption with regexes.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
-Re: Re: Serious cache problem - Page_Load get never get called !!! Ryan Park ASP .Net 0 01-04-2005 06:09 PM
Serious cache problem - Page_Load get never get called !!! Ryan Park ASP .Net 2 01-03-2005 05:52 PM
Re: use anonymous but get get an authentication box Curt_C [MVP] ASP .Net 2 09-21-2004 06:39 PM
use anonymous but get get an authentication box =?Utf-8?B?U2hhcmlm?= ASP .Net 0 09-21-2004 01:01 PM



Advertisments