On Feb 6, Jamie Risk said:
>How would I split, then push onto a list a variable length text string
>with quoted portions (example following) so that a split keeps text
>in quotes together.
>
> "keep me together" separate1 separate2 separate3 "keep me together too"
>separate4
>
>If the above were
Bob Showalter wrote:
> Just for kicks, here's a way to do it using split(). Text::CSV_XS is
> still recommended, as it can deal with unbalanced quotes, escaped
> embedded quotes, etc.
>
> $ perl -le 'print for map { /"(.*)"/ ? $1 : split " ", $_ } split
> /(".*?")/, q["keep me together" separate1 s
Bob Showalter wrote:
> Jamie Risk wrote:
> > How would I split, then push onto a list a variable length text
> > string with quoted portions (example following) so that a split
> > keeps text in quotes together.
> >
> > "keep me together" separate1 separate2 separate3 "keep me
> > together too"
Jamie Risk wrote:
> How would I split, then push onto a list a variable length text string
> with quoted portions (example following) so that a split keeps text
> in quotes together.
>
> "keep me together" separate1 separate2 separate3 "keep me together
> too" separate4
>
> If the above were p
Never mind, although perhaps someone can explain what "split(/''/)" is
doing. It satisfies my needs, but I don't know why (emphasis on the '' bit
between the / /).
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
How would I split, then push onto a list a variable length text string
with quoted portions (example following) so that a split keeps text
in quotes together.
"keep me together" separate1 separate2 separate3 "keep me together too"
separate4
If the above were parsed, I should like to see six sep