On Fri, 23 Feb 2001 10:33:10 +1300, in cf-talk you wrote:
>Firstly I'd like to mention that doing this is playing with fire. ;)
Yeah, of course it is ;)

>Secondly, I'd suggest three replaces:
>1. Replace application.cfm with an easily recognisable other string without
>application in the name.
>2. Replace "([^a-zA-Z0-9])application.([a-zA-z])" with "\1request.\2".
>3. Replace the funny string with application.cfm again.
Yeah, that's a good idea. I'll use
([^a-zA-Z0-9])application.([a-zA-z<]) instead, though, since
"application." is often the end of the sentence in the text of the
website, and it's sometimes followed by a tag.

I'm still curious about the regex, though, since I'm trying to learn
regexes. Although I will use the above method for now, I would like to
ask any experts on the subject if they could slap a single regex
together for me. It doesn't need to replace anything, but I'm very
curious about the matching regex--how do you exclude a certain string
("cfm"), a space (" "), AND a "<" from matching (see my original
question below).

If you care to refer to the book, "Mastering Regular Expressions," I
have it. 

Thanks for indulging me,
Jamie
>
>David Cummins
>
>Jamie Jackson wrote:
>> 
>> Hi, I'm trying to globally replace (with CF Studio) application
>> variables with request variables in several sites. I can't figure out
>> exactly how, as I don't know how to negate strings (as opposed to just
>> character classes).
>> 
>> I want to change application.variableX to request.variableX, but I
>> don't want to change "application. ", "application.<br>", or
>> references to "application.cfm"
>> 
>> Could you please help?
>> 
>> Here is just one of may seriously flawed attempts at a match:
>> (application\.)([^ ]|[^cC][^fF][^mM]|[^<])
>> 
>> Thanks,
>> Jamie
>> 
>> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to