List Info

Thread: Re: Tag set inside another tag set.




Re: Tag set inside another tag set.
country flaguser name
United States
2007-10-04 10:18:05
Ben Doom wrote:
> Not tested, but try this (or a variation):
>
>
(<!---.*?(?!--->))?<cfquery(.|[rn])*?/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" ?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RV
JP

Archive: http://www.houseoffusion.com/groups/RegEx/me
ssage.cfm/messageid:1070
Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/u
nsubscribe.cfm?user=22184.15789.21

Re: Tag set inside another tag set.
country flaguser name
United States
2007-10-04 13:42:05
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 <HOFilsweb.com> wrote:
>
> Ben Doom wrote:
> > Not tested, but try this (or a variation):
> >
> >
(<!---.*?(?!--->))?<cfquery(.|[rn])*?/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/me
ssage.cfm/messageid:1072
Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/u
nsubscribe.cfm?user=22184.15789.21

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )