cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morus Walter <>
Subject RE: processing when a pattern does NOT match
Date Wed, 22 Dec 2004 11:57:19 GMT
David Leangen writes:
> Conclusion: try the "^" operator. For example: "^[^(test)].*"
> Please let me know when you figure this out.
No. That cannot work.
^ is defined within character classes only as negation.
Outside it means the start of the string (`^a' matches `ab' but not `ba' 
whereas `a' matches both).

Probably something can be done using negative lookaheads but I'm not sure 
and don't have enough experience with cocoon to say, if that would work in
that context.

matches every string starting with foo
strings not starting with foo.
In both cases the RE does not consume the matched/forbidden text (while
^foo does).
I guess ^(?!foo$) should match any text not beeing 'foo'.
(briefly tested with perl)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message