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 :)