Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vNyM6-003nRj-3C for pgsql-general@arkaria.postgresql.org; Tue, 25 Nov 2025 19:05:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vNyM5-00Arbs-0n for pgsql-general@arkaria.postgresql.org; Tue, 25 Nov 2025 19:05:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vNyM4-00Arbj-2x for pgsql-general@lists.postgresql.org; Tue, 25 Nov 2025 19:05:37 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1vNyM2-001RVj-3A for pgsql-general@lists.postgresql.org; Tue, 25 Nov 2025 19:05:36 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id B4E442A14D6 for ; Tue, 25 Nov 2025 11:05:34 -0800 (PST) Date: Tue, 25 Nov 2025 11:05:34 -0800 (PST) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: Selecting all variations of job title in a list In-Reply-To: Message-ID: <8f256754-4ece-b67d-de5b-188b72b8a410@appl-ecosys.com> References: MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 25 Nov 2025, Ron Johnson wrote: > Maybe regex_match() with a bunch of OR clauses. > > In bash, I'd do something like: > grep -E ' ^Asst Gen Mgr.*|^Env Mgr.*|^Gen Mgr.*|^Mgr.*|^Plant Mgr..*' > foo.txt Ron, I've not used regex in postgres before, only in emacs and small languages. So I'll learn how to do this. I was trying to avoid multiple OR clauses, but that script will not be run often so it should not matter. Thanks, Rich