Perhaps that was a bad example. I don't necessarily want to find a CF variable. Sometimes I want to find a tag. Sometimes just text. I just don't want to find it in between <!--- and ---> (CF comment tags).
> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 26, 2002 7:31 PM > To: CF-Talk > Subject: Re: Regex for CF Studio > > > 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 > > > ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists