In truth all you have to do is double the pound signs so Replace(string, '##',
'####', 'all') should do it. It will replace every single pound within your
text with a double pound, ignoring everything else.
>Well as a last resort I thought I could put the offending code in a CFTRY
>and just lose a few records once in a while, but trying to remove a # sign
>from a string will even bomb a CFTRY!
>
>Somehow I have to be able to get past this obstacle. Barney B. suggested
>this regular expression but it doesn't work and all the logical variants I
>can think of don't work either: REreplace(myText, '"([^"]*)##([^"]*")',
>"\1####\2", "all")
>
>
>
>
>This was my original question, hopefully someone out there will have dealt
>with something like this before:
>
>I've got a compiled application that can be programmed to output ColdFusion
>code along with its regular output, writing CF templates that later run
>under CF 5.0. However if any of its regular output contains pound signs,
>CF throws an error when the template is executed. Both these examples will
>fail:
>
><CFSCRIPT>
> Test = 'SKU # 1716-SY-367';
></CFSCRIPT>
>
>Or
>
><CFSET Test = 'SKU # 1716-SY-367'>
>
>
>What I would LIKE to do is use Replace or REReplace or somehow escape the
>damn pound signs out of the strings more or less like so:
>
><CFSET Test = #REplace("SKU # 1716-SY-367", "#Chr(35)#", "", "ALL")#> --
>but it doesn't work.
>
>(#Chr(35)# in the REplace function will replace say, DOUBLE pound signs in
>the string, so at least that works)
>
>It is not possible to use the original compiled application to either
>double up the pound signs or eliminate them, I have to work with the output
>it gives me and it isn't very sophisticated. I can use it to output any CF
>code I want but I have to deal with the strings it gives me. Any help
>will be greatly appreciated.
>
>
>Regards,
>
>Karl S.
>
>
>--
>No virus found in this outgoing message.
>Checked by AVG Anti-Virus.
>Version: 7.0.323 / Virus Database: 267.8.15/49 - Release Date: 7/14/05
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211959
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54