MathGroup Archive 2011

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

Search the Archive

Pattern Matching Question

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