Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Pattern Matching Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116702] Pattern Matching Question
  • From: Just A Stranger <forpeopleidontknow at gmail.com>
  • Date: Thu, 24 Feb 2011 06:23:57 -0500 (EST)

I'm new to pattern matching, and am stuck on a seemingly simple probem:

If I want to transform a pattern like

(I)  Power[x,_]   i.e. x^_

but NOT

(II) Power[x,Plus[_,_]]   i.e. x^(_+_)

How would I go about making that rule?

x^_ -> NewForm

Applies the rule to (II), which I don't want.

Thank you for your help :)




  • Prev by Date: Re: How to deal with big matrix 2
  • Next by Date: Which, Switch, If, and Piecewise
  • Previous by thread: Re: Solved: Factor/Simplify set of complex expressions
  • Next by thread: Re: Pattern Matching Question