Re: from the list select
- To: mathgroup at smc.vnet.net
- Subject: [mg101064] Re: from the list select
- From: Peter Breitfeld <phbrf at t-online.de>
- Date: Tue, 23 Jun 2009 07:04:38 -0400 (EDT)
- References: <h1nf1q$941$1@smc.vnet.net>
terrie riley wrote: > from this list select the person who has P in the third position > > > namedata = {{"Aardsma", "David", "P"},{"Bay", "Jason", "OF"}} > If you want the exactly "P" at the third position use: Cases[namedata,{_,_,"P"}] If you want any string with a "P" in it at the third position of the sublists use: Cases[namedata,{_,_,_?(StringMatch[#,"*P*"]&)}] -- _________________________________________________________________ Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de