Re: Regular expression to UPPER() a lower case string - Mailing list pgsql-general

From Eagna
Subject Re: Regular expression to UPPER() a lower case string
Date
Msg-id no-TAHXqJChgnBd7ktUt7mgS_bXjtckgoWF12PUsaO-OoBcCT1m_a5PHqbkvX3pM1VX1tYE1-N2obvLDoA5S7WZvi9FU0JdIvlbAEgAmZm8=@protonmail.com
Whole thread Raw
In response to Re: Regular expression to UPPER() a lower case string  (Gianni Ceccarelli <dakkar@thenautilus.net>)
Responses Re: Regular expression to UPPER() a lower case string
List pgsql-general
> `select upper(x) from test`

I know about the UPPER() and LOWER() functions - I don't want them!

> If you want to do something else, please describe the actual thing you
> want to do. Not "how", but "what".


I have described it - I want to do the *_same_* thing as UPPER() does using REGEXP_REPLACE().

In the duplicate thread (apologies to the list for that - my bad!), I wrote:


====================

> I want to index on a REGEXP_REPLACE() - I thought using lower -> upper would be a good test.

> I could always have used another REGEXP_REPLACE() for my testing, but I then became "obsessed"  with the idea of
usingREGEXP_REPLACE() as a substitute for UPPER() - kind of an obfuscated code competition with myself! :-) 

========================

So, I have no actual *_need_* for this, other than a desire to learn and understand what's going on and why.

> Maybe you need to look at `regexp_split_to_array` or
> `regexp_split_to_table`?

I'm pretty sure that I have a good understanding of these. I thought I understood REGEXP_REPLACE(), but obviously not.

Thanks for any further input.

E.


> Dakkar - <Mobilis in mobile>




pgsql-general by date:

Previous
From: "Peter J. Holzer"
Date:
Subject: Re: Regular expression to UPPER() a lower case string
Next
From: "Peter J. Holzer"
Date:
Subject: Re: Regular expression to UPPER() a lower case string