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: [mg82360] Re: Finds strings in a list that begin with "A"
  • From: Raj <rajanikanth at gmail.com>
  • Date: Thu, 18 Oct 2007 04:57:42 -0400 (EDT)
  • References: <ff4egn$d6p$1@smc.vnet.net>

hi!

Try
Select[ls, StringTake[#, 1] == "A" &]
where ls is the list of strings.

Cheers,

Raj

On Oct 17, 12:44 pm, tomfabtas... at hotmail.com wrote:
> 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: Re: Mathematica 6.01 and openSUSE 10.3
  • Next by Date: Re: Recursion limit: a good idea to ignore?
  • Previous by thread: Re: Finds strings in a list that begin with "A"
  • Next by thread: Re: Finds strings in a list that begin with "A"