Re: finding the position of a pattern in list
- To: mathgroup at smc.vnet.net
- Subject: [mg64629] Re: finding the position of a pattern in list
- From: "dkr" <dkrjeg at adelphia.net>
- Date: Fri, 24 Feb 2006 00:18:35 -0500 (EST)
- References: <dtjjcv$de7$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In[25]:= findPos[x_List]:= StringPosition[ToString/@x//StringJoin, "0"~~"1"]/.{a_Integer,_}:>a; In[26]:= findPos[{0,0,1,1,1,0,0,1,1,1,0}] Out[26]= {2,7} dkr