MathGroup Archive 2007

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

Search the Archive

Re: Finds strings in a list that begin with "A"


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
> >
> >
>
>
>




  • Prev by Date: New Publish for Player service opens up access to dynamic Mathematica content
  • Next by Date: Re: ListLinePlot[] inside a loop
  • Previous by thread: RE: Finds strings in a list that begin with "A"
  • Next by thread: ListPlot: Choose segents to draw.