MathGroup Archive 2000

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

Search the Archive

Re: extracting elements from a list?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25397] Re: extracting elements from a list?
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 29 Sep 2000 01:06:32 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <8qlon6$q8a@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

with 

lst={v$2332Period, v$2334Period, v$1231MaxAccel}

the command

Select[lst, StringMatchQ[ToString[#], "*Period*"] &]

will do it.

Regards
  Jens

Ryan VanRiper wrote:
> 
> Hi,  I have a question about extracting particular elements in a list.
> 
> If i have the list {v$2332Period, v$2334Period, v$1231MaxAccel}
> 
> How would i go about searching through this list and returning a new
> list that has only elements with the word "Period" in them.
> 
> So the answer im looking for using the above list would be:
> 
> newlist = {v$2332Period, v$2334Period}
> 
> Thanks!
> Ryan


  • Prev by Date: Q: FastBinaryFiles-package: how to detect EndOfFile?
  • Next by Date: Re: extracting elements from a list?
  • Previous by thread: Re: extracting elements from a list?
  • Next by thread: Re: extracting elements from a list?