Because regular expression parsers see '(' as the beginning of a regex
group whereas ')' is evaluated literally.  You'll need to escape the
opening parenthesis.

<cfset Form.City1 = rereplace(Form.City1,"\(","( ", "all")>


Steve Brownlee
http://www.fusioncube.net/

 

-----Original Message-----
From: paul zanini [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 20, 2006 9:34 AM
To: CF-Talk
Subject: in REREPLACE ")" works but not "("

I cannot findout why this works:
<cfset Form.City1 = rereplace(Form.City1,")","( ", "all")>

and this does not:

<cfset Form.City1 = rereplace(Form.City1,"(","( ", "all")>

the problem is when the string to be replaced is "(" or chr(40).  The
character replacing it can be "(" or "(" it does not matter, it would
work as long the first one is ")"

Any ideas?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264579
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