cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: Maintaining request in match string.
Date Tue, 16 Sep 2003 08:05:54 GMT
On 16.Sep.2003 -- 04:51 PM, Joel P W Pitt wrote:
> Hi there,
> 
> I've tried several times to get help here with no luck, so I thought I'd
> resort to a more general question.
> 
> Is it possible to use a matcher to match against the request string?
> For example:
> 
> If I had the URL
> http://localhost/info.html?45,23
> 
> Could I use a matcher in this manner:
> <map:match pattern="info.html?*,*">
>            <map:parameter name="x" value="{1}"/>
>            <map:parameter name="y" value="{2}"/>
>    <!--do stuff here-->
> </map:match>

Try to use the regexp matcher instead of the simple glob pattern
matcher:

<map:match type="regexp" pattern="info.html\?(\d+),(\d+)">

please check that \d (=decimal) and the escaping of brackets is
correct. I'm always struggling with tool takes which flavour of
regular expressions.... if \d is unknown, you could replace it with
[1-0] or [1234567890] 

HTH

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message