Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82415] RE: [mg82267] Finds strings in a list that begin with "A"
  • From: "Tom O'Brien" <tomfabtastic at hotmail.com>
  • Date: Fri, 19 Oct 2007 05:10:11 -0400 (EDT)
  • References: <12170776.1192646376451.JavaMail.root@m35>

Thanks for all the great replies !

> To: tomfabtastic at hotmail.com; mathgroup=
@smc.vnet.net> Subject: Re: [mg82267] Finds strings in a list that begin wi=
th "A"> From: drmajorbob at bigfoot.com> Date: Wed, 17 Oct 2007 17:06:35 -0500=
> > strings = {"And", "Bat", "Artistic", "Cob"};> Flatten@StringCases[str=
ings, "A" ~~ ___]> > {"And", "Artistic"}> > or> > Pick[strings, StringMatch=
Q[strings, "A" ~~ __]]> > {"And", "Artistic"}> > Bobby> > On Wed, 17 Oct 20=
07 02:44:15 -0500, <tomfabtastic at hotmail.com> wrote:> > > Hello,> >> > I am=
 trying to look through a list of strings and return all strings> > that st=
art with an "A".> >> > For example, my list could be :> >> > {"And", "Bat",=
 "Artistic", "Cob"} so I want to return {"And",> > "Artistic"}.> >> > Any i=
deas ?> >> > Thanks,> > Tom> >> >> >> > > > -- > DrMajorBob at bigfoot.com


  • Prev by Date: Re: ListLinePlot[] inside a loop
  • Next by Date: New Publish for Player service opens up access to dynamic Mathematica content
  • Previous by thread: Integer Points on elliptic curve
  • Next by thread: Re: Finds strings in a list that begin with "A"