StringReplace
- To: mathgroup at smc.vnet.net
- Subject: [mg57260] StringReplace
- From: Maxim <ab_def at prontomail.com>
- Date: Sun, 22 May 2005 03:59:48 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Consider:
In[1]:= f = StringReplace[#, s__ ~~ "1" :> f[s]]&;
In[2]:= f["11"] // FullForm
Out[2]//FullForm= "1\.0011"
("\.00" is the symbol with code 0). This happens only with recursive
definitions: Mathematica prepends the result returned from the recursive
call to the existing string instead of replacing a part of it.
Maxim Rytin
m.r at inbox.ru
- Follow-Ups:
- Re: StringReplace
- From: "Oyvind Tafjord" <tafjord@wolfram.com>
- Re: StringReplace