MathGroup Archive 2005

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

Search the Archive

Re: position of a pattern in a list


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