Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Problem with matching.

  • To: mathgroup at
  • Subject: [mg53913] Re: [mg53907] Problem with matching.
  • From: Bob Hanlon <hanlonr at>
  • Date: Fri, 4 Feb 2005 04:11:08 -0500 (EST)
  • Reply-to: hanlonr at
  • Sender: owner-wri-mathgroup at



The two terms on the LHS of the rule are identical so they are multiplied to 
form F^2.  Use the following:



Bob Hanlon

> From: Josef Karthauser <joe at>
To: mathgroup at
> Date: 2005/02/02 Wed PM 06:10:51 EST
> To: mathgroup at
> Subject: [mg53913] [mg53907] Problem with matching.
> 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
> FreeBSD (cvs meister, admin and hacker)
> Physics Particle Theory (student)
> ================ An eclectic mix of fact and theory. 

  • Prev by Date: Re: Area Under Curve (Min Length Interval)
  • Next by Date: Re: Problem with matching.
  • Previous by thread: Re: Problem with matching.
  • Next by thread: Re: Problem with matching.