Re: quoted csv to array pattern

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Michael Moore <michaeljmoore(at)gmail(dot)com>
Cc: postgres list <pgsql-sql(at)postgresql(dot)org>
Subject: Re: quoted csv to array pattern
Date: 2016-05-25 23:34:58
Message-ID: CAKFQuwZBE3YxwUOTp=ZVfTqxH1wcS+qfU_+2OLhz+NdQd_xePw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, May 25, 2016 at 7:25 PM, Michael Moore <michaeljmoore(at)gmail(dot)com>
wrote:

> I am trying to use
> SELECT regexp_split_to_table('''quick brown'', ''fox'' ''over, dog''',
> ',');
>
> I need the output to be:
>
>> quick brown
>> fox
>> over, dog
>
>
>
You cannot reliably/easily parse/split CSV with embedded delimiters using
regex...you can cheat a bit if your data allows by making the delimiter <',
'> instead of just <,>

David J.


In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Moore 2016-05-26 00:26:08 Re: quoted csv to array pattern
Previous Message Michael Moore 2016-05-25 23:25:23 quoted csv to array pattern