From: Bill Kelly Date: 2001-10-15T08:24:03+09:00 Subject: [ruby-talk:22536] Re: extracting from delimited text files From: "Sean Russell" > [...] > > Doh! No, you're right. I had it right the first time. I should have > learned by now never to question my mself. Foolish me for thinking I could > have been wrong! The proper regexp should be > > /".*?"|[^,]*/ > This would appear to fail the unit tests. =-) (Unless the tests are wrong themselves, which has happened before on occasion. But the regexp above seems to produce "extra" null fields. . . I think it's the zero-or-more effectively matching on a comma - because it implies a zero-width match is OK. . . ?) [see ruby-talk:22534 for the unit test used] Bill