MathGroup Archive 2012

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

Search the Archive

Re: altering each member of a list that matches a certain pattern


 {19, 16, 5, 13, 10, 20, 1, 3, 18, 8, 9, 6, 12, 7, 4, 15, 11, 14, 2,
  17} /. {z_?(# >= 10 &) :> SuperStar[z]}

--David


On Jun 20, 3:54 am, Jason Ebaugh <ebaughja... at gmail.com> wrote:
> Good people,
>
> I need to alter each member of a list that matches a certain pattern.
> However, I need the whole list back, in its original order.
> So Cases[] on its own doesn't do the trick.
>
> Here is a toy example that is analogous to my real problem:
> Put an asterisk on each value that is 10 or greater in the following list=


  • Prev by Date: Mathematica freezes?
  • Next by Date: Re: altering each member of a list that matches a certain pattern
  • Previous by thread: Re: altering each member of a list that matches a certain pattern
  • Next by thread: Re: altering each member of a list that matches a certain pattern