Will, Lookaround doesn't work with ColdFusion's regex engine. Instead, use Java's:
#str.matches(re)# (returns true/false) also look into replaceFirst, replaceAll and split. Ehh, I'd link my blog where I have a couple entries and a presentation on it, but I've been having DNS issues for a few days, and it looks like they'll continue through the next week... Instead, here's a link to java.lang.string - if you can do it in Java, you can do it in CF! http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html nathan strutz http://www.dopefly.com/ On Thu, Jul 3, 2008 at 11:38 AM, Will Tomlinson <[EMAIL PROTECTED]> wrote: > Dangit. I can't make this flag it. It LOOKS like it'd work. > Find the first instance of the rbo call, then make sure it's closed > AFTERwards. > > <cfset str = ' > <cfscript> > var rbo = ""; > var someVar = "Will"; > var someOtherVar = "Whatever"; > > Whateverelse logic here... > > rbo = closestObj(); > rbo = ""; > </cfscript> > '> > > <cfset re = 'var\s(rbo\s=\s"";)(rbo\s=\scloseObj\(\);)\1(?!\2)'> > > > <cfoutput>#reFindNoCase(re, str)#</cfoutput> > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:308549 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4