Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJbWk-0000wZ-Ip for pgsql-sql@arkaria.postgresql.org; Mon, 05 Nov 2018 09:50:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gJbWi-0002gW-Tj for pgsql-sql@arkaria.postgresql.org; Mon, 05 Nov 2018 09:50:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJNx3-00012a-8e for pgsql-sql@lists.postgresql.org; Sun, 04 Nov 2018 19:20:49 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gJNx1-0000PN-3N for pgsql-sql@lists.postgresql.org; Sun, 04 Nov 2018 19:20:48 +0000 Received: by mail-pg1-x52a.google.com with SMTP id i4-v6so3177805pgq.9 for ; Sun, 04 Nov 2018 11:20:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:date:subject:message-id :references:in-reply-to:to; bh=n2g8iUSHAVOqj96s+5Di5XJYerSmMKTjHrWAoZhOS6U=; b=UydwHVYBaE/ZrEW1uqwA6LpsRrRBitOPU6keS/28+Iy/FC1zMXs/+8hRDorExLfpg4 3Ua2ikT4warKfyp/5q6IUhV6o98rTqT/Ox8wcFz/XYE/DjNQ5DXOmVtpz95hGoVbRAhn ITufh0UhB0LodjeTb7z1HkA2MDUOqXtlF/C58rlMDJstzdAcrWakDE8FeYYx+r2r7tf7 HsXT64+zmATGYZSNaFpi3gAWtUv9e48UmOpfqeH9Z4cymeCkhmlJ7RPCSRKK/nMhh8iN dUCzw6nct4hcb0fGcHsWit/kTysoN688ghDlYPZ3z2ETKPIc5+9biZWE3JTbZDzSEyHU V/qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version:date :subject:message-id:references:in-reply-to:to; bh=n2g8iUSHAVOqj96s+5Di5XJYerSmMKTjHrWAoZhOS6U=; b=UGlizaT1zXzn9NWbn8WHywZmnCviVh4mraQDZcheX51efSeZUO6HOHEABPj4JubUM4 kyxXoGHM9fXpHb1MCRb0Crchgc5tWcT0xDMPKCGXzexMhlnWVfMhh8qZt4TWodCkRm7H 5eQ4/ArrDASlu16FBh/KxkVsj++YVDR3K0s6GsiyrPEwGqd33VMeRS4mN/g+cO2vKPWR tEd1VmN/3MzOzthl1YadnR6yTsWbfXPZ8DsJoOWAU6rSrPz0ianHvHSMvMbISlli7vdJ 56T24pEyx13jnq2Hx4MzcpNPI0W6xsDRIpp1T8FUSV60n+EjUdBtfdq800LKrFO75ezQ vNwA== X-Gm-Message-State: AGRZ1gIMQWPJyvgW2R++lhwL4M1kEXqc6VgbGlI0K+hq4dONrRaJdTY1 yE2FfYQ+Jg02SZ46Q9dZ1SQQZXoN X-Google-Smtp-Source: AJdET5co8HiSMj4reJmEoRSM39c5j+obWdVymRVgjLzMxDGfEc8g6AUWbNsLYPihu833qTc6eoTtKQ== X-Received: by 2002:a62:fc52:: with SMTP id e79-v6mr4043041pfh.167.1541359244620; Sun, 04 Nov 2018 11:20:44 -0800 (PST) Received: from ?IPv6:2605:e000:c7c4:f400:94d7:99a4:a4a9:6e83? ([2605:e000:c7c4:f400:94d7:99a4:a4a9:6e83]) by smtp.gmail.com with ESMTPSA id a6-v6sm31024290pgm.26.2018.11.04.11.20.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Nov 2018 11:20:43 -0800 (PST) From: "A. Sasaki" Content-Type: multipart/alternative; boundary=Apple-Mail-C0D14F18-8764-4B6C-AB87-A943B4369ED0 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) Date: Sun, 4 Nov 2018 09:20:42 -1000 Subject: Re: Regular Expressions Message-Id: <1D0900B9-EE3F-4960-8762-B7CE6D4D59EE@gmail.com> References: <012401d47472$0ebc9240$2c35b6c0$@gmail.com> In-Reply-To: <012401d47472$0ebc9240$2c35b6c0$@gmail.com> To: pgsql-sql@lists.postgresql.org X-Mailer: iPad Mail (16A366) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail-C0D14F18-8764-4B6C-AB87-A943B4369ED0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =E2=80=98(*\mtext1\M*\mtext2\M)|(*\mtext2\M*\mtext1\M)=E2=80=99 Thanks, -Andrew- > On Nov 4, 2018, at 9:10 AM, Mark Williams wrote: >=20 > If I wanted to search for whole words in a field I would use something lik= e: > =20 > Select * from mytable where myfield ~* =E2=80=98(\mtext1\M) | (\mtext2\M)=E2= =80=99 > =20 > This would find all instances of myfield containing either =E2=80=9Ctext1=E2= =80=9D or =E2=80=9Ctext2=E2=80=9D. > =20 > I can=E2=80=99t figure out how to search myfield for all instances which c= ontain =E2=80=9Ctext1=E2=80=9D AND =E2=80=9Ctext2=E2=80=9D. > =20 > In other words | is the OR operator. What is the AND operator. Tried + and= whilst that executes, it doesn=E2=80=99t return matching fields. > =20 > Thanks > =20 > Mark > =20 > __ > =20 --Apple-Mail-C0D14F18-8764-4B6C-AB87-A943B4369ED0 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

=E2=80=98(*\mtext1\M*\mtext2\M)|(*= \mtext2\M*\mtext1\M)=E2=80=99


Thanks,

-A= ndrew-

On Nov 4, 2018, at 9:10 AM, Mark Will= iams <markwillimas@gmail.com> wrote:

= --Apple-Mail-C0D14F18-8764-4B6C-AB87-A943B4369ED0--