I wanted to see if I could use a negative look ahead on this block of code to 
make sure if there's a var rbo=""; in the code, there must be a rbo = 
closeObj(); somewhere after it. Like so...

<cfset str = '
<cfscript>
var rbo = "";
var someVar = "Will";
var someOtherVar = "Whatever";

Whateverelse logic here...

rbo = closeObj();
rbo = "";

'>

I played around with a negative lookahead and it looks like a powerful regex 
tool... I just can't make it work. 

I gave up at the \2

<cfset re = '(.+)(var\srbo\s=\s"";)(\2)'>

<cfoutput>#reFindNoCase(re, str)#</cfoutput>

I'm trying to capture the whole chunk, capture the rbo line only, then 
lookahead to see if it's located in the rest of the whole chunk. 

Make sense?

Thanks,
Will 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308544
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to