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: [mg25407] Re: extracting elements from a list?
  • From: "Martin Rommel" <Martin_Rommel at mac.com>
  • Date: Fri, 29 Sep 2000 01:06:55 -0400 (EDT)
  • References: <8qlon6$q8a@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

> 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.

I assume you the list consists of strings, otherwise wrap the ToString
command around the argument #.

Select[{"v$2332Period", "v$2334Period", "v$1231MaxAccel"},
  StringPosition[#, "Period"] != {} &]

Out[36]=
{"v$2332Period", "v$2334Period"}

Cheers, Martin




  • Prev by Date: extracting common items from a list
  • Next by Date: Re: Point inside a polygon?
  • Previous by thread: Re: extracting elements from a list?
  • Next by thread: Re: extracting elements from a list?