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 1452B3A4892 for ; Thu, 4 Nov 2004 15:07:55 +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 90787-08 for ; Thu, 4 Nov 2004 15:07:40 +0000 (GMT) Received: from tomts31-srv.bellnexxia.net (tomts31.bellnexxia.net [209.226.175.105]) by svr1.postgresql.org (Postfix) with ESMTP id C3F203A4764 for ; Thu, 4 Nov 2004 15:07:42 +0000 (GMT) Received: from [192.168.1.56] ([67.68.233.49]) by tomts31-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20041104150739.PTKH1708.tomts31-srv.bellnexxia.net@[192.168.1.56]> for ; Thu, 4 Nov 2004 10:07:39 -0500 Message-ID: <418A45B1.5080908@siunik.com> Date: Thu, 04 Nov 2004 10:07:29 -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 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/55 X-Sequence-Number: 11477 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