I think that "wibblesplat"/1 will return wibblesplat (that being 
everything not followed by wobble) and splatwobble/4 will return 
splatwobble (everything not preceded by wibble) but, yeah.  That's 
basically the right idea.

--Ben Doom

Peter Boughton wrote:
> 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" ?
>>
>>
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1073
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