Re: Checking for a given phrase in an expression
- To: mathgroup at smc.vnet.net
- Subject: [mg60761] Re: [mg60744] Checking for a given phrase in an expression
- From: <bsyehuda at gmail.com>
- Date: Wed, 28 Sep 2005 01:40:57 -0400 (EDT)
- References: <200509270745.DAA18926@smc.vnet.net>
- Reply-to: bsyehuda at gmail.com
- Sender: owner-wri-mathgroup at wolfram.com
Out of the sleeve solution (I do not have time to have an intelligent one right now) is to generate subsets of aa and then test if bb is a an element in the list of subsets so MemberQ[Subsets[aa, Length[bb]], bb] returns True as expected yehuda On 9/27/05, lost.and.lonely.physicist at gmail.com < lost.and.lonely.physicist at gmail.com> wrote: > > Hello everyone > > Is it possible to ask Mathematica to check if a given phrase occurs in > an expression? Say I have > > aa = 1 + x + x y + Log[Sin[z]] > > and > > bb = x + Log[Sin[z]] > > Can Mathematica tell me such a phrase bb exists in aa? Can it tell me > its 'position' within the expression aa? > > Thanks for the help! > >
- Follow-Ups:
- Re: Re: Checking for a given phrase in an expression
- From: Andrzej Kozlowski <andrzej@yhc.att.ne.jp>
- Re: Re: Checking for a given phrase in an expression
- References:
- Checking for a given phrase in an expression
- From: lost.and.lonely.physicist@gmail.com
- Checking for a given phrase in an expression