Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'How to Map out first element' topicStudent Support Forum > General > "How to Map out first element"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
09/16/12 00:02am

In[1]:= x={{"This","is","the","first","sentence"},{"And","this","is","the","second"}};
Map[Rest,x]

Out[2]= {{is,the,first,sentence},{this,is,the,second}}

In[3]:= Select[Flatten[x],StringMatchQ[#, RegularExpression["[A-Z].+"]]&]

Out[3]= {This,And}

URL: ,

Subject (listing for 'How to Map out first element')
Author Date Posted
How to Map out first element Daniel 09/14/12 10:29pm
Re: How to Map out first element Bill Simpson 09/16/12 00:02am
Re: How to Map out first element yehuda 09/16/12 01:08am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic