MathGroup Archive 2005

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

Search the Archive

Re: Problem with matching

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53931] Re: Problem with matching
  • From: David Bailey <dave at Remove_Thisdbailey.co.uk>
  • Date: Fri, 4 Feb 2005 04:11:52 -0500 (EST)
  • References: <ctrngb$brk$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Josef Karthauser wrote:
> Can someone tell me why this doesn't match?
> 
> F[{x, 2, c}]F[{x, 1, f}] /. F[{___, a_, ___}]F[{___, a_, ___}] :> yes
> 
> I'm expecting 'yes' to be returned if any of the list arguments to F[]
> contain the same value.  It doesn't match however; what am I doing
> wrong?
> 
> Thanks,
> Joe
> --
> Josef Karthauser (joe at tao.org.uk)	       http://www.josef-k.net/
> FreeBSD (cvs meister, admin and hacker)     http://www.uk.FreeBSD.org/
> Physics Particle Theory (student)   http://www.pact.cpes.sussex.ac.uk/
> ================ An eclectic mix of fact and theory. =================
> 
> 
Hi,

This looks like a bug! It works if you make a tiny change:

F[{x,2,c}]F[{x,1,f}]/.F[{___,a_/;True,___}]F[{___,a_,___}]:>yes

David Bailey
dbaileyconsultancy.co.uk


  • Prev by Date: Re: Problem with matching.
  • Next by Date: Re: Problem with matching.
  • Previous by thread: Re: crash on x86_64: mathematica
  • Next by thread: Re: Re: Latex + Mathematica EPS file problems