Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2759

Re: Pattern matching help

From Armand Tamzarian <mike.honeychurch@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Pattern matching help
Date 2011-05-28 11:19 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <irqlo5$e83$1@smc.vnet.net> (permalink)
References <irntgn$som$1@smc.vnet.net>

Show all headers | View raw


On May 27, 8:13 pm, Chuck <chuck.can...@gmail.com> wrote:
> I've been using Mathematica for a long time now but have always been a
> bit frustrated with understanding the pattern matching syntax.
>
> I noticed in the current thread about Position, where DrMajorBob
> explains the difference between testing and pattern matching, that I
> had never come across the syntax for testing before.
>
> I have searched many times through the years for a clear explanation
> about how to use the various testing and matching patterns but I have
> never found one.  The help files in Mathematica are typically quite
> helpful, if occasionally cryptic, but this one aspect has completely
> stumped me for years.
>
> I would like to improve my jinky little tricks that I use and make
> full use of this feature.
>
> Have I missed something obvious somewhere?  Can someone point me to a
> clear explanation of how to use these various tests and matches?
>
> Thanks,
> Chuck


Chuck, these two "forms" that you saw in the answers are conditions
and pattern tests. Have a look through these sections of the
documentation, particularly the tutorial.

ref/PatternTest

ref/Condition

tutorial/PuttingConstraintsOnPatterns

Mike

Back to comp.soft-sys.math.mathematica | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Pattern matching help Chuck <chuck.cannon@gmail.com> - 2011-05-27 10:13 +0000
  Re: Pattern matching help Armand Tamzarian <mike.honeychurch@gmail.com> - 2011-05-28 11:19 +0000

csiph-web