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 1vOHoP-000to7-27 for pgsql-general@arkaria.postgresql.org; Wed, 26 Nov 2025 15:52:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vOHoO-0006aM-0w for pgsql-general@arkaria.postgresql.org; Wed, 26 Nov 2025 15:52:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vOHoN-0006aE-39 for pgsql-general@lists.postgresql.org; Wed, 26 Nov 2025 15:52:08 +0000 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vOHoM-001dHb-0q for pgsql-general@lists.postgresql.org; Wed, 26 Nov 2025 15:52:08 +0000 Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-7c75fc222c3so2204396a34.0 for ; Wed, 26 Nov 2025 07:52:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764172324; x=1764777124; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=C/XAjxLqW9SsXC6oYXB1jdC0wQDtKjKdjsyCZWCXQbE=; b=OhPlywvxhS55fG5md48YyuxOy7egy1O1QmiNLPCUuR/HgRvYDTGvpLtLVdVLA9dbCo pw/smipwdD4qtyusmE9cGHc7m6/xGqYUBbMylFEUmVSvLFlG13czkMlQCST9/ewR1l4G OOAkwqDJ3rLB+zi/oMtRPYkmLVbHYh0CDx/yEiU12fhrcvS+uKKJg8zmFbpOXc+649nz PjEgjpXnEZceTWwjnCkknWN1eU9oiftd1fRjkM1sD1M9YmIf7yJImta/l4ge9l2VL5an KW5gK5dlMGuptxxCYdutXPh5LSvy793EL+JxkhD/cnIvySswrC8t5PaVXu0CgWXUBvgn mS5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764172324; x=1764777124; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=C/XAjxLqW9SsXC6oYXB1jdC0wQDtKjKdjsyCZWCXQbE=; b=BiOrnfzRdn0qQK8F+n1qOn5ZOnpiLxyvcIHEwn4wrTv3b5nFcmDzMkphemCGSblDaA giRiRAY7aIvIwcpPLTm30q3Mw5aXLaZKSlTNYkzmUvK4GUPgnzgDPI5UsDokiuaDWy4A gEPvZBjLvorCXOOlaTJ/KUuZIQA+YbQDvQZSJA4c3eYoQTIFxBNEHlY/t8nc9g7dfPlD Evsz3m/a6uvWN8gv/1O4G2uCpDto9LU3QuLVxiKN2icOdrt7qRBnA6ka8xu4Ky7nDqs0 4Uf2qSw2wjL/SEXGYCkuDvSpvpF8Xalvglyh1ePd3BwmXJSZQQwjHjg7WYZF7rzCNg6s I7Ng== X-Forwarded-Encrypted: i=1; AJvYcCVWHojIjcvvvciEM9DarxQ/kxprfnssGxCK1UOt1YmNwGaRt9lxmJljuZHtlzSuZVMLQ3sXCF0DPj49Ps+N@lists.postgresql.org X-Gm-Message-State: AOJu0YwsQcwqibs2YssGF0+8RjUTIa8cZcT7vK7gG6FJZan9D6FT3aH4 2dEPuk4ay/FqfvEFgkuYS6ORTOv5N6tmlFZdEhGJkILkWz6CupvPOnMYx2M2AF+vHHu4S+9ytHd Q2pD3a13mWwG9psuM3Qt2NzwiaCGPu4I= X-Gm-Gg: ASbGncsm3DrA3ARtFbH9bVWURR0lCLkiRgUQAMws/crWo8gH+NYwks/QYtkjsU8Sijc c6+K/M7JEWYfYLk9QuLqu4rkt9xUE4BdNSskGalfzQ14AJ36QaHUhDZs3bN5zjmWWQK8Ze4+9q7 HvIkFvIztrsAediUSVruEB95E6Kvic2Stunlarxxrv+ky2Mc12/TUjqiWUIE+VOkzHhDgRR6DCe TMyH4VkztDDqd7gRyG0aM/0gOG/QhbEe6FuZqlau277WlDMi2/zU669cVUuUo7HsELlyEM2Pw== X-Google-Smtp-Source: AGHT+IGojnQ8607SUfX3cQwzN289JoAXdvzuC8YXr7GxkefGdb81Nk8DEsQqC9T72WMJmejD+kd7ZyLYb+zAs+yOF2s= X-Received: by 2002:a05:6830:925:b0:7c7:2d7d:5d0f with SMTP id 46e09a7af769-7c799075778mr8297513a34.20.1764172323886; Wed, 26 Nov 2025 07:52:03 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:6802:1290:b0:606:1f52:7ef0 with HTTP; Wed, 26 Nov 2025 07:52:03 -0800 (PST) In-Reply-To: <20251126164356.9a3b7fc25d5118e28175f9a4@wanadoo.fr> References: <20251126154844.e6e3d5c7f476cc966fc201f4@wanadoo.fr> <29ffee7e-40a8-f911-4419-24ba8558f5db@appl-ecosys.com> <20251126164356.9a3b7fc25d5118e28175f9a4@wanadoo.fr> From: "David G. Johnston" Date: Wed, 26 Nov 2025 08:52:03 -0700 X-Gm-Features: AWmQ_bnhyZP9Z6A48PnMKGhpM8z4JFk4Zz6yw2o8Kf-j9hPJjsbJTGv7UJDP6HY Message-ID: Subject: Re: Selecting all variations of job title in a list To: Vincent Veyron Cc: Rich Shepard , "pgsql-general@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000b01c5006448160b4" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000b01c5006448160b4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wednesday, November 26, 2025, Vincent Veyron wrote= : > On Wed, 26 Nov 2025 07:10:16 -0800 (PST) > Rich Shepard wrote: > > > > > Learning postgres regexp is at the top of my list. > > > > https://perldoc.perl.org/perlre > > Read the first few pages and you'll be good to go. > I was using this tool a while back when I was doing heavy regex work. https://www.regexbuddy.com/ Keep in mind the native flavor of regex in PostgreSQL is TCL, not Perl. But I=E2=80=99d still say regexp is not the best solution here - unless you encapsulate the logic in a function. I suspect you=E2=80=99ll want to use = this logic in more than just a single query and with a literal regexp you have to rely on manual synchronization. Note, you could combine the lookup table with regexes. Though beware of ensure you don=E2=80=99t produce dupl= icate matches if you go that route. David J. --000000000000b01c5006448160b4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wednesday, November 26, 2025, Vincent Veyron <vv.lists@wanadoo.fr> wrote:
On Wed, 26 Nov 2025 07:10:16 -0800 (PST)
Rich Shepard <rshepard@appl-= ecosys.com> wrote:

>
> Learning postgres regexp is at the top of my list.
>

https://perld= oc.perl.org/perlre

Read the first few pages and you'll be good to go.

I was using this tool a while back when I = was doing heavy regex work.


<= div>Keep in mind the native flavor of regex in PostgreSQL is TCL, not Perl.=

But I=E2=80=99d still say regexp is not the best = solution here - unless you encapsulate the logic in a function.=C2=A0 I sus= pect you=E2=80=99ll want to use this logic in more than just a single query= and with a literal regexp you have to rely on manual synchronization.=C2= =A0 Note, you could combine the lookup table with regexes.=C2=A0 Though bew= are of ensure you don=E2=80=99t produce duplicate matches if you go that ro= ute.

David J.

--000000000000b01c5006448160b4--