MathGroup Archive 2005

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

Search the Archive

StringReplace


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