Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: pattern matching question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61840] Re: pattern matching question
  • From: "dkr" <dkrjeg at adelphia.net>
  • Date: Tue, 1 Nov 2005 00:39:28 -0500 (EST)
  • References: <dk4u7f$378$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In[16]:=
rules={{{_,m1_},{_,m2_},{_,m3_}}/;(m1!=m2!=m3):>
        "something",
      {{_,m1_},{_,m2_},{_,m3_}}:>"something else"};
In[17]:=
{{1,1},{1,1},{2,2}}/.rules
Out[17]=
something else
In[18]:=
{{1,1},{1,2},{2,3}}/.rules
Out[18]=
something


  • Prev by Date: Re: problem with making boxes
  • Previous by thread: pattern matching question
  • Next by thread: problem with making boxes