Re: How do I get String.split() to do what I want?
From: Phil Hühn (Not_at_valid.net)
Date: 06/30/04
- Previous message: Chris Smith: "Re: Get the directory of the entry file"
- In reply to: Phil Hühn: "Re: How do I get String.split() to do what I want?"
- Next in thread: Roedy Green: "Re: How do I get String.split() to do what I want?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 01 Jul 2004 01:25:29 +1200
Phil Hühn wrote:
> Yu SONG wrote:
>
>> is it always in the form of "digit, 'abc', digit"?
>
> No, that was just a short example, there may be a varying number of
> arguments, eg
>
> "5,6,7,'oh, joy',15,'yes',3,7,3"
> or
> "'hello',97,45,'doe,john','bloggs,fred',3,8"
Actually, I should say what else I tried. I had a string with 36 fields
but using regex "," it only extracted 19 fields.
With regex "\',\'|\d,\'|\',\d" it found 33.
With regex "\',\'|\d,\'|\',\d|\d,\d" it went back to only 29! Weird.
- Previous message: Chris Smith: "Re: Get the directory of the entry file"
- In reply to: Phil Hühn: "Re: How do I get String.split() to do what I want?"
- Next in thread: Roedy Green: "Re: How do I get String.split() to do what I want?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]