Re: Finds strings in a list that begin with "A"
- To: mathgroup at smc.vnet.net
- Subject: [mg82344] Re: [mg82267] Finds strings in a list that begin with "A"
- From: Fred Meinberg <fredm at wolfram.com>
- Date: Thu, 18 Oct 2007 04:49:31 -0400 (EDT)
- References: <200710170744.DAA13490@smc.vnet.net>
You can use
Select[list, StringMatchQ[#, "A*"]&]
and set IgnoreCase -> True inside StringMatchQ if you want to include
strings beginning with "a".
Fred Meinberg
Wolfram Research
On Oct 17, 2007, at 3:44 AM, tomfabtastic 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
>
- References:
- Finds strings in a list that begin with "A"
- From: tomfabtastic@hotmail.com
- Finds strings in a list that begin with "A"