Re: reFine :: search and replace for tag attribute

2007-02-12 Thread Rob Wilkerson
If you're using CFEclipse or, I think Homsite supported this as well, you can run a find and replace operation against a set of project files. The find can specify a regex and the replace can include backreferences, if necessary. On 2/11/07, AJ Mercer [EMAIL PROTECTED] wrote: Hi All, I have a

reFine :: search and replace for tag attribute

2007-02-11 Thread AJ Mercer
Hi All, I have a lot of cflocations in my application and I want to modify the URL attribute from:cflocation url=#ATTRIBUTES.url# addtoken=no to:cflocation url=#urlSessionFormat(ATTRIBUTES.url)# addtoken=no first off, any one know of an easy why to do it? I am in the process of writing a

Re: reFine :: search and replace for tag attribute

2007-02-11 Thread James Holmes
reFind finds only one occurrence at a time. You need to loop over the file contents, doing the reFind() until the find doesn't find anything. On 2/12/07, AJ Mercer [EMAIL PROTECTED] wrote: Hi All, I have a lot of cflocations in my application and I want to modify the URL attribute

Re: reFine :: search and replace for tag attribute

2007-02-11 Thread AJ Mercer
I can now confirm that :-) Thought it might have been my regex Now have cfset x = refindNoCase('(CFLOCATION URL=)([^]*)([^]*)', fileContents, startPos,true) / This returns a struct of arrays with array element 0 being the complete string but even better, elements 1-3 corresponding to the

Re: reFine :: search and replace for tag attribute

2007-02-11 Thread Mik Muller
Interesting... using cf to modify cf files from a programming point of view. If you're not talking about gb of files, I'd use an app designed for the job. Despite my confidence in my own programming, somehow I don't think I'd ever write a script to open every cf file, do a search and replace,