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 1mr8CJ-0003oY-3E for pgsql-general@arkaria.postgresql.org; Sun, 28 Nov 2021 00:37:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mr8CH-0002vh-M6 for pgsql-general@arkaria.postgresql.org; Sun, 28 Nov 2021 00:37:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mr8CH-0002vY-BS for pgsql-general@lists.postgresql.org; Sun, 28 Nov 2021 00:37:37 +0000 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mr8CF-0003pP-Bf for pgsql-general@lists.postgresql.org; Sun, 28 Nov 2021 00:37:36 +0000 Received: by mail-pf1-x42c.google.com with SMTP id x5so12712569pfr.0 for ; Sat, 27 Nov 2021 16:37:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=SUoLT3Czj7rbzPPEBhdn5aWw3RVl2cYTeWu/vIVS+gE=; b=oSFTDuIKUaAcLIEziYp+zTpkc5sC7lF2yYzEqDaJDbDWKrNRY0xfQ/ORncRO77DS+f tTtn0nRvFNt1NfJYLKm89rZjUJdFYnjhglrTi1shYB32Y1Gn8xkpBFj7Ox7YXQoOc7zT sTEY7Je6p6wyKBWqeaVxYuBO08PA2Z4Gfuo4voL+mHAqL48HvbSbM/d4AwdZBufminah q/E7eiQEPQt9rJo3jS63ETyvjR86j4ttQwrwTC86DapWcOPCTz4H3ytP+mUHuz0JKXvL owO621ZjvF6SGiXsBh3BlmpJ8jnwqLb9Q+LUz0INyn46CR4zy3bjGb9eT+VkbMsUTjgw lPNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=SUoLT3Czj7rbzPPEBhdn5aWw3RVl2cYTeWu/vIVS+gE=; b=oGRnFNvyD5VAc+FrvKqCS6lYmm2+CJYuQ6ryMagZdElp2U6X5mFeaHemMtWicEzTmz 3ewTDdnK5JcZevoBFiT0jn6GViXYn5bHQXB+29UrDaF81V9AvIOpIoTp9Wz+vdx05OqY fof7JjsDcVYrfdCmmtTKbAlMakgidw/8gBOrwv/ekOkGpukHt7F4XbpgJJQcqQ97t3DS bF9YkZ8yMFmMP9QSHvhNjBNMoVG8rXJyd5MHLrSkOZkiNElorEM/ntvc1VyT2NuRHgZF LzxSlWi0nEkTheYSXY7R5JtGuT0PClfbpulbjYRfhP0EcP+czF2eTSJeDiXM9VwnUFxb PRUQ== X-Gm-Message-State: AOAM532boUKeGbEIKUl5Kw3zUzy/gfZbDwebOL7yKXecUQFF7d9PPNnM 9Av5ONfRRAA77GZCuPyOZ60= X-Google-Smtp-Source: ABdhPJy6IxIOpI2CLhCEE/hhMeXhAruc2UDXOBiGRntj3boy1erzv5+sKtoNDtiixj1Qb2TmJ0n0bA== X-Received: by 2002:a05:6a00:99e:b0:49f:f9e2:c116 with SMTP id u30-20020a056a00099e00b0049ff9e2c116mr30326938pfg.83.1638059854120; Sat, 27 Nov 2021 16:37:34 -0800 (PST) Received: from smtpclient.apple ([2601:681:5500:dde0:a447:c08c:86ce:3436]) by smtp.gmail.com with ESMTPSA id m6sm8086109pgs.18.2021.11.27.16.37.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Nov 2021 16:37:33 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Rob Sargent Mime-Version: 1.0 (1.0) Subject: Re: Match 2 words and more Date: Sat, 27 Nov 2021 17:37:33 -0700 Message-Id: <6791C12E-B9A3-4917-9113-186B2F26D708@gmail.com> References: Cc: pgsql-general In-Reply-To: To: Shaozhong SHI X-Mailer: iPhone Mail (18H107) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Nov 27, 2021, at 5:27 PM, Shaozhong SHI wrote:= >=20 > =EF=BB=BF > this is supposed to find those to have 2 words and more. >=20 > select name FROM a_table where "STREET_NAME" ~ '^[[:alpha:]+ ]+[:alpha:]+$= '; >=20 > But, it finds only one word as well. >=20 > It appears that regex is not robust. >=20 > Can anyone shed light on this? >=20 > Regards, >=20 Show the results of the query. Describe how those results differ from what y= ou desire or from what you expect.=20 > David