Short answer:
(?!--->) = negative look-ahead
(?<!<!--) = negative look-behind


And in an attempt to educate, hopefully without causing confusion:

1: Negative look-ahead is .*(?!wobble)
2: Positive look-ahead is .*(?=wobble)
3: Positive look-behind is (?<=wibble).*
4: Negative look-behind is (?<!wibble).*

So if you have the text "wibblewobble", 2 and 3 will match it, but 2 will
return only the "wibble", whilst 3 only returns "wobble".
If you have text "wibblesplat", 1 will match it and return "wibble", but
2/3/4 wont.
If you have text "splatwobble", 4 will match it and return "wobble", but
1/2/3 wont.

(I *think* that's right)

On 10/4/07, Ian Skinner <[EMAIL PROTECTED]> wrote:
>
> Ben Doom wrote:
> > Not tested, but try this (or a variation):
> >
> > (<!---.*?(?!--->))?<cfquery(.|[\r\n])*?/cfquery>((?<!<!--).*?--->)?
> >
> > I don't use DW, so I don't know if this supports negative
> > lookahead/lookbehind, and this is sort of off the top of my very tired
> head.
> >
> > HTH.
> >
> > --Ben The Regex Ninja Doom
> I will try this, but in my attempt to understand the code, what part is
> a "negative look ahead/look behind" ?
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1072
Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21

Reply via email to