Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*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

Re: StringReplace

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57279] Re: [mg57260] StringReplace
  • From: "Oyvind Tafjord" <tafjord at wolfram.com>
  • Date: Mon, 23 May 2005 02:20:49 -0400 (EDT)
  • References: <200505220759.DAA01424@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

----- Original Message ----- 
From: "Maxim" <ab_def at prontomail.com>
To: mathgroup at smc.vnet.net
Subject: [mg57279] [mg57260] 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

There is indeed a bug in recursive string pattern matching, it will be fixed
in the next release.

Thanks,
Oyvind Tafjord
Wolfram Research


  • Prev by Date: Re: Re: how to map function with over 1 arguments to list
  • Next by Date: Re: Re: how to map function with over 1 arguments to list
  • Previous by thread: StringReplace
  • Next by thread: undocumented ANOVA error/warning?