Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqJKV-0003Hz-EO for pgsql-general@arkaria.postgresql.org; Thu, 16 Aug 2018 14:32:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fqJKT-0007kg-HN for pgsql-general@arkaria.postgresql.org; Thu, 16 Aug 2018 14:32:49 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqJKS-0007kY-8A for pgsql-general@lists.postgresql.org; Thu, 16 Aug 2018 14:32:49 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqJKO-0006Yz-2j for pgsql-general@lists.postgresql.org; Thu, 16 Aug 2018 14:32:46 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 307F72125E; Thu, 16 Aug 2018 10:32:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 16 Aug 2018 10:32:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=vOGL67+o1DpEQZ6ZPdtjbK7H5UUAm 6gR5ahxELrTPTU=; b=RtozwPRjSN19cfk2Sh7MGND3qArBEt5/p4ctGrn06NEuy AUAZ29qOgwld0QW785j2FCo0UXqCicixhCAan/EBtHR1sNeSRaG2+e2vxOIAk8Uk VThFmQTXKOmL7OBYYsndspSiqv5Wx9NKsg2ruQuAJGQXmu5vV2MCh3BziQOEtVLv 7rxxEUIthIDHEpCV5JboGk6z98aO1Zwy2u51uknkDbG/CDaSl0LVZWS2PRabc2dF 3lVRUpgdUnofkX/Gl8d53sPr5YdWnq9BJnmoGzNYPt5fmO/bOaF4ee17/GuW6WzJ oVc5P8cqlHHk73bsnmwaARwXWUgEKfMQKStwN5RLQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=vOGL67 +o1DpEQZ6ZPdtjbK7H5UUAm6gR5ahxELrTPTU=; b=RJS2DXET74ZmCbWcmo6DOj +kbhJIEkv6Z0TGu8yhBuCmeXc2BjW+TCu6KLoax0PQKpdSlQCPVBsxatKUaixRmJ a0QZrEybtq/8RctUfoZHpiHvjIMulEVFxVZO6Rsz6bo9NUsAugBTSTHz0SqS9uVG 1HOeg3J/Jt9jFD7Hi0y0hiw1HEVDgBq7wPESEEWuztDpPkDL2S294JComFNogvpS kDKUNYtGvIN6hC+IgXlZz9AavZpFoB9AaJPK0Mpcvgu/Y4nVUhag6zZBR1dvy34p nUhRkdbnknl/8qkLk1fPCzSRGAKncvilp4U3CIQaszTMZQxmySWpsamR4adQBi0A == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id CC3B3E4519; Thu, 16 Aug 2018 10:32:41 -0400 (EDT) Subject: Re: Sv: Re: regex match and special characters To: Andreas Joseph Krogh , pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: <79587b6b-1b3b-e96f-160b-f5c55fccb391@aklaver.com> Date: Thu, 16 Aug 2018 07:32:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 08/16/2018 07:04 AM, Andreas Joseph Krogh wrote: > char(2006) produces the wrong character as 2006 is the hex-value. You > have to use 8198: > andreak@[local]:543310.4 andreak=# select version(); > ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ > │                                            version >                                             │ > ├────────────────────────────────────────────────────────────────────────────────────────────────┤ > │ PostgreSQL 10.4 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu > 7.3.0-16ubuntu3) 7.3.0, 64-bit │ > └────────────────────────────────────────────────────────────────────────────────────────────────┘ > (1 row) > > andreak@[local]:543310.4 andreak=# select 'abcd'||chr(8198) ~ 'abcd\s'; > ┌──────────┐ > │ ?column? │ > ├──────────┤ > │ t        │ > └──────────┘ > (1 row) Argh, read the wrong line. Thanks for the correction. Still: test=# select version(); version ------------------------------------------------------------------------------------ PostgreSQL 10.5 on x86_64-pc-linux-gnu, compiled by gcc (SUSE Linux) 4.8.5, 64-bit (1 row) test=# select 'abcd'||chr(8198) ~ E'abcd\s'; ?column? ---------- f (1 row) > -- > *Andreas Joseph Krogh* > CTO / Partner - Visena AS > Mobile: +47 909 56 963 > andreas@visena.com > www.visena.com > -- Adrian Klaver adrian.klaver@aklaver.com