Re: Finds strings in a list that begin with "A"
- To: mathgroup at smc.vnet.net
- Subject: [mg82401] Re: Finds strings in a list that begin with "A"
- From: "Oskar Itzinger" <oskar at opec.org>
- Date: Fri, 19 Oct 2007 05:02:58 -0400 (EDT)
- References: <ff4egn$d6p$1@smc.vnet.net> <ff7908$o4m$1@smc.vnet.net>
Please ignore - I'd too hastily pieced together something I use somewhere else; besides, it isn't exactly correct. Sorry. /oskar "Oskar Itzinger" <oskar at opec.org> wrote in message news:ff7908$o4m$1 at smc.vnet.net... > Not the most artistic but it seems do to the trick: > > l={"And","Bat", "Artistic", "Cob"}; > > Map[First,Map[Select[#,#[[2]]&]&,MapThread[List,{l,Map[Equal["A", > #]&,Map[StringTake[#,1]&,l]]}],{0}]] > {And, Artistic} > > <tomfabtastic at hotmail.com> wrote in message > news:ff4egn$d6p$1 at smc.vnet.net... > > Hello, > > > > I am trying to look through a list of strings and return all strings > > that start with an "A". > > > > For example, my list could be : > > > > {"And", "Bat", "Artistic", "Cob"} so I want to return {"And", > > "Artistic"}. > > > > Any ideas ? > > > > Thanks, > > Tom > > > > > > >