Yes, this helped me as well 8), I appreciate this. 

On Mon Jun 01,2009 04:30 pm, V?ctor Pergolesi wrote:
>    I proved some cases that could help you. I hope you undestand me.
>    1 - All the content of the pattern is read as an unique regular
>    expresion. So the only part to reference I know is {0}.
>    2 - BUT there are different situacion if you use:
>    case A: pattern="\.*(\d*$)"   - Here {0} are all the numbers of the
>    final
>    case B: pattern="month(\d*$)" - Here {0} is month +  the numbers of the
>    final.
>    I do not know exactly what you want to capture, but I undestand that
>    could help you.
>    3 - You could capture the case B and then for example via an xsl
>    retrieve the part you need.
>    Below are the examples:
>    <map:match type="regexp" pattern="month(\d*$)">
>       <map:generate src="documento.xml"/>
>          <map:transform src="documento.xsl">
>       <map:parameter name="valor" value="{0}"/>
>       </map:transform>
>       <map:serialize />
>    </map:match>
> 
> 
>    <map:match type="regexp" pattern="\.*(\d*$)">
>       <map:generate src="documento.xml"/>
>       <map:transform src="documento.xsl">
>          <map:parameter name="valor" value="{0}"/>
>       </map:transform>
>       <map:serialize />
>    </map:match>
>    File documento.xml
>    <?xml version="1.0" encoding="UTF-8"?>
>    <elemento></elemento>
>    File documento.xsl
>    <?xml version="1.0"?>
>    <xsl:stylesheet version="1.0"
>    xmlns:xsl="[1]http://www.w3.org/1999/XSL/Transform";>
>        <xsl:param name="valor"/>
> 
>        <xsl:template match="/">
>            <html>
>            <head>
>                <title>Expresi?n regular</title>
>            </head>
>            <body>
>                Captura de expresi?n regular:<br></br>
>                - aplication of a function to the value:&#160;<xsl:value-of
>    select="substring-after($valor,'month')"/><br></br>
>                - the value {0}:&#160; <xsl:value-of select="$valor"/>
>            </body>
>            </html>
>        </xsl:template>
> 
>    </xsl:stylesheet>
>    I hope this help
>    I will prove if {1} have a value in some case.
>    Victor Pergolesi
>    Codimat S.A.
>    ?rea Sistemas
>    Web: [2]www.codimat.com.ar
>    Tel.: (0291) 459-2480 | 459-2424
>    Fax: (0291) 459-2400 | 0-800-666-42266
>    Don Bosco 1495 - B8003CAA Bah?a Blanca - Argentina
>        _______________________________________________________________
> 
>      From: Mansour Al Akeel [mailto:[3]mansour.alak...@gmail.com]
>      To: [4]us...@cocoon.apache.org
>      Sent: Mon, 01 Jun 2009 15:45:26 -0300
>      Subject: Re: Regexp matcher with digits
>      Can someone kindly answer this question and give an example about
>      how to
>      use regex and retrieve the matches. I am stuck with a project that's
>      writen in Cocoon and I need this to continue.
>      On Sun May 31,2009 01:54 am, Mansour Al Akeel wrote:
>      > Ok, let's clarify this and put it in different words. I am able to
>      match
>      > on the digits part but not able to obtain this digits
>      >
>      > <map:match type="regexp" pattern="\.*/\d$">
>      > ......
>      > .....
>      > <map:parameter name="href" value="{1}"/>
>      > <map:parameter name="depth" value="{2}"/>
>      >
>      > The variable {1} is matching and I can obtain as expected, but {2}
>      is
>      > not.
>      >
>      >
>      > Can someone please share the knowledge and direct me to resolve
>      this ?
>      >
>      >
>      >
>      --------------------------------------------------------------------
>      -
>      To unsubscribe, e-mail: [5]users-unsubscr...@cocoon.apache.org
>      For additional commands, e-mail: [6]users-h...@cocoon.apache.org
>      __________________________________________________________________
> 
>    Este mensaje y sus adjuntos contienen informaci?n confidencial y son pa
>    ra uso exclusivo del destinatario. Si hubiese recibido este mensaje por
>     error, o contuviera informaci?n que Ud. no desea recibir, por favor le
>     agradecemos nos lo haga saber y lo elimine de su sistema. Cualquier in
>    conveniente, enviarlo a librodeque...@codimat.com.ar.
>    Este correo ha sido chequeado por el servidor de Codimat S.A. www.codim
>    at.com.ar
> 
> References
> 
>    1. http://www.w3.org/1999/XSL/Transform%22
>    2. http://www.codimat.com.ar/
>    3. mailto:mansour.alak...@gmail.com
>    4. mailto:users@cocoon.apache.org
>    5. mailto:users-unsubscr...@cocoon.apache.org
>    6. mailto:users-h...@cocoon.apache.org

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

Reply via email to