Pattern matches only when named
- To: mathgroup at smc.vnet.net
- Subject: [mg43873] Pattern matches only when named
- From: Ken Morgan <kemorgan at vt.edu>
- Date: Thu, 9 Oct 2003 01:55:17 -0400 (EDT)
- Organization: Virginia Tech, Blacksburg, Virginia, USA
- Sender: owner-wri-mathgroup at wolfram.com
Just a curiosity: In[1]:= f + g /. u_ + _ -> h Out[1]:= h but In[2]:= f + g /. _ + _ -> h Out[2]:= f + g Why does the pattern match only when one of the Blanks has a name? Thanks, Ken
- Follow-Ups:
- Re: Pattern matches only when named
- From: "Peter Pein" <petsie@arcor.de>
- Re: Pattern matches only when named