Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WlLsp-0000TE-5k for pgsql-bugs@arkaria.postgresql.org; Fri, 16 May 2014 17:25:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WlLso-0002ub-Kz for pgsql-bugs@arkaria.postgresql.org; Fri, 16 May 2014 17:25:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WlLsn-0002uN-Sp for pgsql-bugs@postgresql.org; Fri, 16 May 2014 17:25:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WlLsm-0004WM-Ln for pgsql-bugs@postgresql.org; Fri, 16 May 2014 17:25:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s4GHPI2l016206; Fri, 16 May 2014 13:25:18 -0400 From: Tom Lane To: danilogarciamartins@hotmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #10334: Function regexp_split_to_array Error with '.' (comma) In-reply-to: <20140516020324.16846.76345@wrigleys.postgresql.org> References: <20140516020324.16846.76345@wrigleys.postgresql.org> Comments: In-reply-to danilogarciamartins@hotmail.com message dated "Fri, 16 May 2014 02:03:24 -0000" Date: Fri, 16 May 2014 13:25:18 -0400 Message-ID: <16205.1400261118@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org danilogarciamartins@hotmail.com writes: > Ex.: select regexp_split_to_array('1.2.3','.') > returns {"","","","","",""} and not > {1,2,3}. This is not a bug: "." is a wild-card character in regular expressions. You could get the behavior you're evidently after by escaping it: # select regexp_split_to_array('1.2.3','\.'); regexp_split_to_array ----------------------- {1,2,3} (1 row) regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs