MathGroup Archive 2003

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

Search the Archive

Re: negative pattern matching anyone?


Paolo Bientinesi <pauldj at cs.utexas.edu> wrote in message news:<blcqqj$p8h$1 at smc.vnet.net>...
[...] 
> Then, is there a way to match both -3 and -a with the same pattern?

For instance you can use this kind of pattern :

Cases[{3, -3, -a, a+b}, _Integer?Negative | -_]

{-3,-a}

---
jcp


  • Prev by Date: [Q] gridMathematica - Applications/Evaluations
  • Next by Date: Functions with initial values
  • Previous by thread: [Q] gridMathematica - Applications/Evaluations
  • Next by thread: Re: negative pattern matching anyone?