Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XYxxJ-0007tA-Q9 for pgsql-bugs@arkaria.postgresql.org; Tue, 30 Sep 2014 13:59:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XYxxJ-0000MI-A3 for pgsql-bugs@arkaria.postgresql.org; Tue, 30 Sep 2014 13:59:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XYxxI-0000Lw-Bi for pgsql-bugs@postgresql.org; Tue, 30 Sep 2014 13:59:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XYxxB-00074m-8o for pgsql-bugs@postgresql.org; Tue, 30 Sep 2014 13:59:03 +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 s8UDwiLf007486; Tue, 30 Sep 2014 09:58:44 -0400 From: Tom Lane To: dmigowski@ikoffice.de cc: pgsql-bugs@postgresql.org Subject: Re: BUG #11523: Regular expressions work differently on different platforms In-reply-to: <20140930095625.7631.32436@wrigleys.postgresql.org> References: <20140930095625.7631.32436@wrigleys.postgresql.org> Comments: In-reply-to dmigowski@ikoffice.de message dated "Tue, 30 Sep 2014 09:56:25 -0000" Date: Tue, 30 Sep 2014 09:58:44 -0400 Message-ID: <7485.1412085524@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 dmigowski@ikoffice.de writes: > I recently found that regular expressions, or specifically the [:space:] > shorthand escape work differntly on Windows and Linux. On Linux the > non-brakeable space is not included in the shorthand escape, on windows it > is. That would depend on what locale you're using for LC_CTYPE. We can't do much about the fact that locale definitions vary across platforms. In principle you could use C locale, which *is* standardized, but that cure may be worse than the disease for your purposes. You could always spell it out with whatever set of characters you consider whitespace: [ \t\r\n] or something like that. For purposes like email address validation, the set of whitespace characters allowed by the relevant RFCs is probably smaller than most locales' [:space:] anyway. 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