On Mon, Mar 10, 2008 at 8:26 AM, Adrian Lynch <[EMAIL PROTECTED]> wrote:
> I need to change a string like the following:
>
>  "house in clapham 200K with garden"
>
>  into
>
>  "house in clapham 200000 with garden"
>
>  So replacing the "K" with "000".
>
>  I came up with:
>
>  (\d*?)K
>
>  But then in trying to replace the match with:
>
>  \1000
>
>  Or \1 and three zeros, it falls foul because it's looking for the 1000th sub
>  expression.
>
>  Trying to escape the first zero doesn't work because \0 returns the whole
>  matched expression.

Try using the concatentation operator:

replace ( (\d+)K, '\1' & '000' )

BTW, I didn't look up the replace() function signature, so treat that
as pseudo-code.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1129
Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21

Reply via email to