Re: How to split a string containing nested commas-separated substrings

2008-06-24 Thread mario
I have actually highlighted a small neat recipe for doing such unpacking, that I use for parsing arbitrary parameters in Evoque Templating. I never needed to handle "callable" parameters though, as you do in your 3rd string example, so the little "unpack_symbol" recipe I have publiched earlier does

Re: How to split a string containing nested commas-separated substrings

2008-06-18 Thread Matimus
On Jun 18, 10:54 am, Matimus <[EMAIL PROTECTED]> wrote: > On Jun 18, 10:19 am, Robert Dodier <[EMAIL PROTECTED]> wrote: > > > > > Hello, > > > I'd like to split a string by commas, but only at the "top level" so > > to speak. An element can be a comma-less substring, or a > > quoted string, or a su

Re: How to split a string containing nested commas-separated substrings

2008-06-18 Thread Paul McGuire
On Jun 18, 12:19 pm, Robert Dodier <[EMAIL PROTECTED]> wrote: > Hello, > > I'd like to split a string by commas, but only at the "top level" so > to speak. An element can be a comma-less substring, or a > quoted string, or a substring which looks like a function call. > If some element contains com

Re: How to split a string containing nested commas-separated substrings

2008-06-18 Thread Cédric Lucantis
Hi, Le Wednesday 18 June 2008 19:19:57 Robert Dodier, vous avez écrit : > Hello, > > I'd like to split a string by commas, but only at the "top level" so > to speak. An element can be a comma-less substring, or a > quoted string, or a substring which looks like a function call. > If some element c

Re: How to split a string containing nested commas-separated substrings

2008-06-18 Thread Matimus
On Jun 18, 10:19 am, Robert Dodier <[EMAIL PROTECTED]> wrote: > Hello, > > I'd like to split a string by commas, but only at the "top level" so > to speak. An element can be a comma-less substring, or a > quoted string, or a substring which looks like a function call. > If some element contains com

How to split a string containing nested commas-separated substrings

2008-06-18 Thread Robert Dodier
Hello, I'd like to split a string by commas, but only at the "top level" so to speak. An element can be a comma-less substring, or a quoted string, or a substring which looks like a function call. If some element contains commas, I don't want to split it. Examples: 'foo, bar, baz' => 'foo' 'bar'