Ah... why not just escape it by doubling up?

<cfset foo = replace(bar, "##", "", "all") />

Cheers,

!k

-----Original Message-----
From: John Cox [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 12, 2006 6:51 PM
To: CF-Talk
Subject: How to strip a #

I am trying to strip out a # (pound) from a string.  I would have thought
this would have worked:

<cfset foo = replace(bar, "#", "", "all") />

That didn't work, as it thought it was a var (missing an argument).  I tried
to escape it:

<cfset foo = replace(bar, "##", "", "all") />

But that didn't seem to work (i think it is looking for ## at that point).
Any suggestions?




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:260142
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to