pattern matching
- To: mathgroup at smc.vnet.net
- Subject: [mg6967] pattern matching
- From: Marc Mazzariol <Marc.Mazzariol at di.epfl.ch>
- Date: Wed, 30 Apr 1997 22:25:39 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hello, I'm using mathematica 2.2 (Unix), and i'm trying to do pattern matching with repeated patterns. This example produce the result i want : In : {a,a,a,b} /. {a...,b} -> Hello Out : Hello But this one don't : In : {b} /. {a...,b} -> Hello Out : {b} I was hopping : Out : Hello Why doesn't work it ??? -- +--------------------------------------------------------+ | - No brain, no headache - | +--------------------------------------------------------+ | Marc Mazzariol | | Swiss Federal Institute of Technology (EPFL) | | Peripheral Systems Laboratory (LSP) | | CH-1015 Lausanne, Switzerland | | Tel: +41 21 693 3944 | | Fax: +41 21 693 6680 | | E-mail: Marc.Mazzariol at di.epfl.ch | +--------------------------------------------------------+