cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Dolg <steven.d...@indoqa.com>
Subject Re: Regexp matcher with digits
Date Tue, 02 Jun 2009 08:34:39 GMT
Mansour Al Akeel schrieb:
> For some reasons {0} is matching only the digits, because 1 is empty
> always !
>
>       <map:match  type="regexp" pattern="(\**)([0-9])$">
>         ......
>         <map:transform src="transform.xsl">
>                 <map:parameter name="href" value="{1}"/>
>             <map:parameter name="depth" value="{2}"/>
>         </map:transform>
>
> 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.

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


Mime
View raw message