From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Eagna <eagna(at)protonmail(dot)com> |
Cc: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Regular expression for lower case to upper case. |
Date: | 2022-12-10 10:29:02 |
Message-ID: | CAKFQuwbY3gxxtS9fYqDhog6SgOjx4jGE4s9JxZMcjO_YNosnZQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Saturday, December 10, 2022, Eagna <eagna(at)protonmail(dot)com> wrote:
>
>
> Hi all,
>
>
> I want a regex to change the case of a field from UPPER to lower.
>
> I know about the UPPER() and LOWER() functions and they are not what I
> want.
>
> I would have thought this should be very simple, but I've searched a lot
> and can't seem to get an answer.
>
> Here's a fiddle with a couple of things that I've tried - I'm obviously
> missing something that should be starting me in the face.
>
> Any input appreciated.
>
>
> E.
>
>
>
RegExp by itself cannot do this. You have to match all parts of the input
into different capturing groups, then use lower() combined with format() to
build a new string. Putting the capturing groups into an array is the most
useful option.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Eagna | 2022-12-10 10:32:23 | Regular expression to UPPER() a lower case string |
Previous Message | Peter J. Holzer | 2022-12-10 10:25:06 | Re: Regular expression for lower case to upper case. |