Dave (nice name!),

This is taken from the Java API:

Character classes
[abc]   a, b, or c (simple class)
[^abc]  Any character except a, b, or c (negation)
[a-zA-Z]        a through z or A through Z, inclusive (range)
[a-d[m-p]]      a through d, or m through p: [a-dm-p] (union)
[a-z&&[def]]    d, e, or f (intersection)
[a-z&&[^bc]]    a through z, except for b and c: [ad-z] (subtraction)
[a-z&&[^m-p]]   a through z, and not m through p: [a-lq-z](subtraction)


Conclusion: try the "^" operator. For example: "^[^(test)].*"

Please let me know when you figure this out.


Cheers,
Dave




> -----Original Message-----
> From: dave- [mailto:[EMAIL PROTECTED]
> Sent: 22 December 2004 18:31
> To: [EMAIL PROTECTED]
> Subject: Re: processing when a pattern does NOT match
> 
> 
> I seem to be unable to find any documentation that Java regexp has a 
> negate (!) operator.  In any case, I have been unable to get it to work 
> in cocoon.
> 
> I tried <map:match pattern="!^test1" ... and it did not work.  Also the 
> regexp java testing applet seems to consider "!" pumctuation.
> 
> Tony Collen wrote:
> 
> > dave- wrote:
> >
> >> Is there a way to process the block when a match pattern doesn't 
> >> match? Can this be done using either sitemap or regexpr syntax?  TIA 
> >> -dave
> >
> >
> > Use the Regexp matcher, write your regexp and just use the negate (!) 
> > operator.
> >
> > Tony
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to