MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

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


  • Prev by Date: Re: Re: Re: Re: How to get an answer as a Root object?
  • Next by Date: Re: How to Clear y'[0]
  • Previous by thread: Re: MultipleListPlot and Log-List plots
  • Next by thread: Re: StringReplace