X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8613A3A4881 for ; Thu, 4 Nov 2004 15:13:35 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 95957-01 for ; Thu, 4 Nov 2004 15:13:26 +0000 (GMT) Received: from tomts35-srv.bellnexxia.net (tomts35.bellnexxia.net [209.226.175.109]) by svr1.postgresql.org (Postfix) with ESMTP id E5C0B3A4733 for ; Thu, 4 Nov 2004 15:13:28 +0000 (GMT) Received: from [192.168.1.56] ([67.68.233.49]) by tomts35-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20041104151327.TNXZ1968.tomts35-srv.bellnexxia.net@[192.168.1.56]> for ; Thu, 4 Nov 2004 10:13:27 -0500 Message-ID: <418A4717.3000202@siunik.com> Date: Thu, 04 Nov 2004 10:13:27 -0500 From: David Gagnon User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: OT ? - Validating POSIX Regular Expression in Java Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/56 X-Sequence-Number: 11478 Hi all, I know it's not directly the purpose of this list, so I apologize, but I think you guys are the ones who can help me :-) My web site offers a search which supports regular expression (POSIX). I'm looking for a way to validate the regular expression in the application before sending it the the DB. For now Postgresql throwing an error on invalid regular expression. I tried with the gnu-regexp frameworks, It works partly but it's not full proof since an invalid caracter class like [[:awefaewf:]]* is not flagged as an error but causes an error with Postgresql. Any help on this matter will be appreciated. I'm sure it's a common problem and have been addressed before ... I searched but haven't found the answer yet. Thanks for your help /David I