Logic this through. A legal evaluate can come in one of two ways. Inside a
CF tag or inside an output block where it needs pound signs. By that logic,
these two patterns would match it:
<CF[^>]+evaluate\(\)[^>]*>
#evaluate\(\)#
Now using the magic of back referencing, you can do this:
(<CF[^>]+)evaluate\(\)([^>]*>)
(#)evaluate\(\)(#)
If you use either pattern inside the CFStudio extended replace (not together
as they don't stack even with a pipe) then you can use this as the replace
string:
\1spam\2
This will replace all evaluate() with spam in all legal CF places. This will
also replace within comments in one case, when the entire CF tag containing
an evaluate() is commented out.
> I used the advanced search in CF Studio a lot, since we have a lot of
files
> spread over several drives and directories and had a dozen people working
on
> the project at one time.
>
> At the moment I'm trying to find all instances of certain tags and other
> strings so that we can eliminate them, but I'm getting a lot of false hits
> because of comments. For instance, let's say I was searching for all
> instances of evaluate(; I'd get results back from pages with <!--- Removed
> unnecessary evaluate() function --->. Obviously I don't want that.
>
> Can someone offer a regular expression that would find all instances of a
> string ("xyz") UNLESS it appears inside CF Comments and works in CF
Studio?
>
>
> --
> Al Everett
> Allied Office Products
> www.askallied.com
> mailto:[EMAIL PROTECTED]
> v: 973-594-3209
> f: 973-594-3626
>
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists