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 1mpWFI-0003dR-1e for pgsql-general@arkaria.postgresql.org; Tue, 23 Nov 2021 13:54:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mpWFG-0000kX-Pa for pgsql-general@arkaria.postgresql.org; Tue, 23 Nov 2021 13:54:02 +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 1mpWFG-0000kN-Dj for pgsql-general@lists.postgresql.org; Tue, 23 Nov 2021 13:54:02 +0000 Received: from mail.tuxteam.de ([5.199.139.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpWFE-0002YO-13 for pgsql-general@lists.postgresql.org; Tue, 23 Nov 2021 13:54:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=JUYVPbHgZqe3ulQyt0anL2WF0kbN2VvnnsnwzRMxQD4=; b=ex3BufiHdCTuqURNZSxyBZ8Cj/ otpPrGp+JgPjFXRhNVegDWCBpaeamuoZ/aICzOhY6tUojbEz2aVPuPGR4gtNJUnxyBCJJ08QO1Bs3 LGKTc4UnLZ1OX5SmXG9tZo0xxafTNr9dvPUiu3n7DUk0YLDZ8/6PYhsVoOuhKJZ+QUhGw97PJeO6J bQp0exu/flFyLts8KBdvqkJdtm4fwzfI02R/221ttywBrnQ22uJoScHNrS6n8vCY0NYhqtsBrMGMi vFUwSwWDw+x1hyjedhJesQHVV2wB86gDmi2VDnX4yrkUmUQLla9i0ImEpFmRpQ4hxN1ihYuMdhSp/ La5bD7LQ==; Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1mpWFC-00013A-KX for pgsql-general@lists.postgresql.org; Tue, 23 Nov 2021 14:53:58 +0100 Date: Tue, 23 Nov 2021 14:53:58 +0100 To: pgsql-general@lists.postgresql.org Subject: Re: Regex for Word space Word space Word .... Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeW1CeDxOY9wL7/4" Content-Disposition: inline In-Reply-To: From: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --EeW1CeDxOY9wL7/4 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Tue, Nov 23, 2021 at 09:58:00AM +0000, Shaozhong SHI wrote: > Is there any regex for Word space Word space Word and more? It isn't very clear what you want to achieve. From the other mails in this thread I understand that your words start with an uppercase char and continue with lowercase chars. Is that right? You want exactly one space between words, or more than one? What is this "...and more"? Arbitrary repetitions? Which kind of regular expressions do you want to use? POSIX? If all the answers to the above are "yes", you might try something like "(?:[[:upper:]][[:lower:]]*[[:space:]]+)*[[:upper:]][[:lower:]]*" (Caveat: untested). This would match a single word or more than one word, separated by one or more spaces, where a word starts with one upper-case character and continues with zero or more lowercases. HTH - t --EeW1CeDxOY9wL7/4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCYZzycAAKCRAFyCz1etHa RmjwAJsEEu54BVvU4zHajK7mivwx3bSLwwCePwxGD1s70UY3JoX+Scas5Ygoa00= =hMmR -----END PGP SIGNATURE----- --EeW1CeDxOY9wL7/4--