Nathan, thanks so much. This is closer. I am seeing cases where it's
bringing getting files with cfqueries that do not meet the criteria --
they are using only cfqueryparam. I'll take a harder look at this, and
see if I can get it a little closer. Will post back with what I find.

Cheers,
Kris


> Without putting much more time than I should into it, I can get you about
>  95% there...
>
>  (?m)<cfquery\b[^>]*>[\w\W]*?(?<!value=")#[\w\._-]+#[\w\W]*?</cfquery>
>
>  It seems to sometimes get the query before the target query, unfortunately,
>  but it will at least pinpoint the file for you, if not the exact query.
>
>  Remember, this works for eclipse find files which uses the java regex
>  engine. the ?<! negative lookbehind will not work in CF (without employing
>  java's regex engine).
>
>  --
>  nathan strutz
>  http://www.dopefly.com/
>
>  >
>  > With the help of a pal have come up with a regex that I _thought_
>  > would work. Of course, it doesn't. I think I'm running up against that
>  > whole set vs. literal string issue again, but if any of you could take
>  > a look and point me in the right direction, I'd greatly appreciate it.
>  >
>  > In eclipse, I'm doing a search using a regex pattern across my entire
>  > codebase. I want to return any instances of inline CFQUERY where there
>  > is a CF variables referenced that is NOT contained in a CFQUERYPARAM.
>  > I'm willing to run a couple of searches if necessary.
>  >
>  > <cfquery[^>]*>[^=]*=\s*#[^'</cfquery>']*</cfquery>
>  >
>  > What I think this does is looks for the opening cfquery tag (along
>  > with any attributes), then any characters up to an equal-sign, then
>  > any or no whitespace up to a pound-sign, then any content (that is not
>  > the closing </cfquery> tag) up to the closing </cfquery> tag.
>  > Convoluted enough? How does one reference scope "not a specific
>  > literal string" in regex?
>  >

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

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

Reply via email to