Re: extracting elements from a list?
- To: mathgroup at smc.vnet.net
- Subject: [mg25386] Re: [mg25379] extracting elements from a list?
- From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
- Date: Fri, 29 Sep 2000 01:06:17 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Here is one way: In[5]:= Select[{v$2332Period, v$2334Period, v$1231MaxAccel}, StringMatchQ[ToString[#], "*Period*"] &] Out[5]= {v$2332Period, v$2334Period} on 00.9.25 5:29 AM, Ryan VanRiper at ravanrip at yahoo.com 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 > > > > -- Andrzej Kozlowski Toyama International University JAPAN http://platon.c.u-tokyo.ac.jp/andrzej/ http://sigma.tuins.ac.jp/