Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*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: position of a pattern in a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58155] Re: position of a pattern in a list
  • From: "dkr" <dkrjeg at adelphia.net>
  • Date: Mon, 20 Jun 2005 05:21:32 -0400 (EDT)
  • References: <d939le$ano$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

lst={{{"abcd","cv"},{"z","zzbcz"}},{{"v"},{"zbcx"},{"xc","bc"}}};

In[18]:=
Position[lst,a_String/;StringMatchQ[a,___~~"b"~~"c"~~___]]

Out[18]=
{{1,1,1},{1,2,2},{2,2,1},{2,3,2}}


  • Prev by Date: Re: Nested Commutators
  • Next by Date: Re: Transformation rule problem
  • Previous by thread: Re: position of a pattern in a list
  • Next by thread: Re: New Line/CR