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 2002

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

Search the Archive

Re: Question about Replace

  • To: mathgroup at
  • Subject: [mg35689] Re: [mg35670] Question about Replace
  • From: "Xuguang\(Heather\) Zhang" <xuguang_zhang at>
  • Date: Fri, 26 Jul 2002 04:16:31 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

Hi, Bob,

I tried ReplaceRepeated, however, I got the following answer:
x+y+z/(x+y)+e^(x+y)+(w*x)+y//. x+y->x


In fact, there is still one more (x+y) term if we rewritten the answer. That
is e^x+(x+y)+y+(w*x)+z/x. Do you know how to get rid of it? Thanks.

----- Original Message -----
From: <BobHanlon at>
To: mathgroup at
Subject: [mg35689] Re: [mg35670] Question about Replace

> In a message dated 7/25/02 5:06:57 AM, xzhang2 at writes:
> >I have an expression: x+y+z/(x+y)+e^(x+y)+w*x+y.... I want to replace
> >any (x+y) term by x no matter how the expression looks like.  I tried
> >"/."command. However, it does not work properly. Is there any simple way
> >of doing this?
> Use ReplaceRepeated
> x+y+z/(x+y)+e^(x+y)+w*(x+y) //. x+y->x
> e^x + w*x + x + z/x
> Bob Hanlon
> Chantilly, VA  USA

  • Prev by Date: Re: Orientation of BarChart labels
  • Next by Date: Re: troubles with lists
  • Previous by thread: RE: Question about Replace
  • Next by thread: Re: Question about Replace