Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 78605 invoked from network); 3 Jul 2007 03:14:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jul 2007 03:14:28 -0000 Received: (qmail 60119 invoked by uid 500); 3 Jul 2007 03:14:27 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 59724 invoked by uid 500); 3 Jul 2007 03:14:26 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 43115 invoked by uid 99); 2 Jul 2007 12:23:52 -0000 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of bakul.kumar@gmail.com designates 66.249.90.180 as permitted sender) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=V0HvRHZTjJmDw61CaOOJqTLxva6n0ckabzLl+JMcmUYoEKruoevRlJ7JdngEDHjawYm1hxb8yP4Y0Or6IDG1Jnizih619x7bBTgavDZViobANF6eYORcRdr37in4rojXpDUS5G+ks6QR7cGxGOx5WEU3EHmp2StiHMhRIjIdpDI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=J2RvoikRf/RhY9uzDw73OrEk/BNxqGji0d3itzmK7HDlVT32hs0EZGOZF8NbiOlfqVFVV8VbQOh9SIGx+UVTP1xyHAwlbtPDby139O8Su41W1DSL7f8wBBd3Rvlfi7i9VqycO7nJXqHVrec5ShTfQE7Qk7g4EMMKMFjhTRjmau4= Message-ID: <3bdd345a0707020523w83fdfffx6cd44a9b02a68d63@mail.gmail.com> Date: Mon, 2 Jul 2007 17:53:27 +0530 From: "Bakul Kumar" To: commons-user@jakarta.apache.org Subject: Validation Reg ex of ( ). MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_78269_25493340.1183379007279" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_78269_25493340.1183379007279 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I want to validate the telephone number. I want to allow 0-9, *, +,-,(, SPACE and ). That means it should allow : (240) 643-9325 For that I tried : mask ^[0-9()x+. -]*$ This is working fine. But, I don't have any control in RegEx to check whether user has entered valid set of '(' and ')'. I mean, its allowing : (240( 643-9325 as a valid number. If you have an idea of how to check the sequece of brackets '(' and ')'. Please share it with me. regards, Bakul. ------=_Part_78269_25493340.1183379007279--