MathGroup Archive 2009

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

Search the Archive

How to get position of string in a mixed list? (string pattern in

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96170] How to get position of string in a mixed list? (string pattern in
  • From: "goodhei8 at gmail.com" <goodhei8 at gmail.com>
  • Date: Sat, 7 Feb 2009 03:40:31 -0500 (EST)

for list like {"a","abc","dfe","nab",1,2,3,{1,2}}, I want to get all 
strings' position in the list which match a pattern (like 
___~~"ab"~~___). How to do it? How to use a string pattern in a list 
pattern? how to use a pattern with a condition (both list pattern&/; 
StringQ[#] and list pattern /;StringQ[]&, no working for me)

Thanks.


  • Prev by Date: Re: Bad Laplace Transform
  • Next by Date: Re: Time Series Simulations
  • Previous by thread: Re: Mathematica 7.0.0 and X11 forwarding over SSH
  • Next by thread: How to get position of string in a mixed list? (string pattern in