Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive


  • To: mathgroup at
  • Subject: [mg57260] StringReplace
  • From: Maxim <ab_def at>
  • Date: Sun, 22 May 2005 03:59:48 -0400 (EDT)
  • Sender: owner-wri-mathgroup at


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

  • 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