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
- References:
- extracting elements from a list?
- From: Ryan VanRiper <ravanrip@yahoo.com>
- extracting elements from a list?