Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p3xIq-0003tF-0T for pgsql-general@arkaria.postgresql.org; Sat, 10 Dec 2022 10:41:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p3xIn-0002f1-R9 for pgsql-general@arkaria.postgresql.org; Sat, 10 Dec 2022 10:41:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p3xIn-0002es-Gs for pgsql-general@lists.postgresql.org; Sat, 10 Dec 2022 10:41:53 +0000 Received: from mail.thenautilus.net ([178.162.154.203]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p3xIh-0000u0-CC for pgsql-general@lists.postgresql.org; Sat, 10 Dec 2022 10:41:53 +0000 Received: (qmail 15179 invoked from network); 10 Dec 2022 10:41:45 -0000 Received: from unknown (HELO localhost) (dakkar@::ffff:10.111.0.42) by 0 with ESMTPA; 10 Dec 2022 10:41:45 -0000 Date: Sat, 10 Dec 2022 10:41:41 +0000 From: Gianni Ceccarelli To: pgsql-general@lists.postgresql.org Subject: Re: Regular expression to UPPER() a lower case string Message-ID: <20221210104141.35498bc4@thenautilus.net> In-Reply-To: <5C_J_wdWjnwxieBfiMQgeIXLQ5RYXN4-W5jIZyCpkAqlhGO8GxRqwb1jCHfh0EO9SvHYcysvVUXM-ocEBPSb9A-_iiSwfY0DKvljrZ50iA4=@protonmail.com> References: <5C_J_wdWjnwxieBfiMQgeIXLQ5RYXN4-W5jIZyCpkAqlhGO8GxRqwb1jCHfh0EO9SvHYcysvVUXM-ocEBPSb9A-_iiSwfY0DKvljrZ50iA4=@protonmail.com> X-Mailer: Claws Mail 4.1.1git6 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-12-10 Eagna wrote: > This should be very (very) easy - I don't know what I'm missing - > I've done quite complex regular expressions before and I don't know > what I'm doing wrong. Brain burping this morning! You're missing that: * `regexp_replace` doesn't work like that, at all * your logic only works by accident for some languages (try to upcase a `=C3=9F` or a `=C4=B1`) --=20 Dakkar - GPG public key fingerprint =3D A071 E618 DD2C 5901 9574 6FE2 40EA 9883 7519 3F88 key id =3D 0x75193F88