MathGroup Archive 2003

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

Search the Archive

Re: negative pattern matching anyone?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43731] Re: negative pattern matching anyone?
  • From: poujadej at yahoo.fr (Jean-Claude Poujade)
  • Date: Thu, 2 Oct 2003 02:51:33 -0400 (EDT)
  • References: <blcqqj$p8h$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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?