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 2007

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

Search the Archive

Re: Replacement question

  • To: mathgroup at
  • Subject: [mg74186] Re: Replacement question
  • From: Jens-Peer Kuska <kuska at>
  • Date: Wed, 14 Mar 2007 03:40:48 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <et5nnh$jhk$>
  • Reply-to: kuska at


in your example
1 + a + b + c /. a + b -> x
1 + c + x

but for  more complicates cases, you have to use
more complicated patterns.


Brian Beckage wrote:
> I apologize for this very basic question.  I understand how to use /. 
> {} to replace a  variable with a more complex expression, e.g., x-> 
> y+z.  Can one move in the opposite direction to replace all 
> occurrences of y+z with x?   myExpression/.{y+z->x} does not seem to 
> work.
> Thank you for your help,
> Brian

  • Prev by Date: Re: Multi-core Support in Mathematica 5.2
  • Next by Date: Re: Interpolating Function
  • Previous by thread: Re: Replacement question
  • Next by thread: Re: Replacement question