Pattern matching in functions
- To: mathgroup at smc.vnet.net
- Subject: [mg54379] Pattern matching in functions
- From: Maximilian Ulbrich <mulbrich at berkeley.edu>
- Date: Sat, 19 Feb 2005 02:32:49 -0500 (EST)
- Organization: University of California, Berkeley
- Sender: owner-wri-mathgroup at wolfram.com
Hi, I would like to find subexpressions using Cases. In the following case, I expected to find a[b] and a[c] and therefore get {b,c} as the result. However, I get {l,l}. What happens and how can I solve this? Cases[l^4*a[b][l] + l*a[c][l], x_a[y_] -> y, {0, Infinity}] Thanks, Max
- Follow-Ups:
- Re: Pattern matching in functions
- From: DrBob <drbob@bigfoot.com>
- Re: Pattern matching in functions
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: Pattern matching in functions