From users-return-97703-apmail-cocoon-users-archive=cocoon.apache.org@cocoon.apache.org Tue Jun 02 15:05:26 2009 Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 26473 invoked from network); 2 Jun 2009 15:05:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Jun 2009 15:05:26 -0000 Received: (qmail 53843 invoked by uid 500); 2 Jun 2009 15:05:38 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 53779 invoked by uid 500); 2 Jun 2009 15:05:37 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 53771 invoked by uid 99); 2 Jun 2009 15:05:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jun 2009 15:05:37 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mansour.alakeel@gmail.com designates 209.85.220.212 as permitted sender) Received: from [209.85.220.212] (HELO mail-fx0-f212.google.com) (209.85.220.212) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jun 2009 15:05:27 +0000 Received: by fxm8 with SMTP id 8so9819233fxm.18 for ; Tue, 02 Jun 2009 08:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=FHx4FqTonbTXK2oIyEIN8oXe4m4uvmT6NtV0i7JNdkA=; b=g2SGMuS0smZBDkNStyNexTvats78rkdu7SS7YLCvNywlgOdBICVKSRJMi4moW8NitF ifl8IFRR4ZMLLNfYh5LXKt9V+Z1MI0WZ2NB4qX1YttGI3vsdScOWPKKWWLohUBSL6rL2 V5kjeQ1FkVcM+Ftx+FAghB2I5sBkem2GZ7Vh0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=L+ciICk8BC1uKM/7mgzz4KGoKEBGnDsdTcqPwNJ+yWyuoDZlzPgt1rGf0mZUVxZK9+ BSXAJ/KMV5L7EYVEjopcn9YBtJkzwR+Gs8V6iH0jpkSlTHBW+wsI3SC44tX3b3sYY7Vq DDqAC2SelEaQlfZ9Oj6AUaO3/ZK7cRmw3FSvg= Received: by 10.103.193.12 with SMTP id v12mr4094149mup.23.1243955107077; Tue, 02 Jun 2009 08:05:07 -0700 (PDT) Received: from mars.lan (CPE0014bf895399-CM0014f8c19014.cpe.net.cable.rogers.com [99.246.237.4]) by mx.google.com with ESMTPS id n7sm1011722mue.28.2009.06.02.08.05.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 02 Jun 2009 08:05:06 -0700 (PDT) Date: Tue, 2 Jun 2009 12:07:25 -0300 From: Mansour Al Akeel To: users@cocoon.apache.org Subject: Re: Regexp matcher with digits Message-ID: <20090602150724.GA7070@mars.lan> References: <20090601193032.6433f9c7@mail.codimat.com.ar> <20090602071558.GG17295@mars.lan> <4A24E41F.9080108@indoqa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A24E41F.9080108@indoqa.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Checked: Checked by ClamAV on apache.org On Tue Jun 02,2009 10:34 am, Steven Dolg wrote: > Mansour Al Akeel schrieb: >> For some reasons {0} is matching only the digits, because 1 is empty >> always ! >> >> >> ...... >> >> >> >> >> >> My understanding is {0}={1}+{2} but since {1} is empty always, I am >> getting {0}={2}. Now the question is how do I capture {1} ? >> Since the documentaiton says that regexp works like wildcard matcher, >> there should be a way to capture all parts or the regex. >> >> Any one has an idea ? > Your pattern "(\**)([0-9])$" means "any number of asterisks followed by > exactly one digit at the end of the string". > Any number here means 0 or more. > Steven, thank you. I see my mistake. I am looking to match anything ends with a digit. For example: hostname/myBlock/news/4 hostname/myBlock/services/2 hostname/myBlock/news/local/3 hostname/myBlock/3 I need the first part and the digit. The first part can be empty as well. > If the string you are using for matching does not contain any asterisks > before the digit the first group will be empty. > > So the question is, what do you want to capture with the first group? >> >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org