Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

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: [mg25413] Re: [mg25379] extracting elements from a list?
  • From: Christopher Lee French <clfrench at bellatlantic.net>
  • Date: Fri, 29 Sep 2000 01:07:08 -0400 (EDT)
  • References: <200009242029.QAA26833@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

{v$2332Period, v$2334Period, v$1231MaxAccel}
// Cases[#, s_Symbol /; StringMatchQ[SymbolName[s], "*Period"]] &

or

{v$2332Period, v$2334Period, v$1231MaxAccel}
//Select[#,(StringMatchQ[SymbolName[#], "*Period"]&)]&

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: Re: extracting elements from a list?
  • Next by Date: RE: Point inside a plygon?
  • Previous by thread: extracting elements from a list?
  • Next by thread: Re: extracting elements from a list?