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.