Re: splitting sublists
- To: mathgroup at smc.vnet.net
- Subject: [mg58042] Re: [mg58033] splitting sublists
- From: Andrzej Kozlowski <andrzej at akikoz.net>
- Date: Thu, 16 Jun 2005 07:19:36 -0400 (EDT)
- References: <200506160938.FAA18542@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 16 Jun 2005, at 18:38, hrocht at mail15.com wrote: > hi > how to split the sublists inside a bigger list wherever we find "x" > letter > {{3,1,4,"x",1,5,9,2,"x"},{6,5,"x",3,5,"x",8,9,"x"}} > the results will be: > > {{{3,1,4},{1,5,9,2}},{{6,5},{3,5},{8,9}}} > > best regards > and thanks for this great group > anton > > DeleteCases[Split[#,#1=!="x"&=!="x"&]&/@{{3,1,4,"x",1,5,9,2,"x"}, {6,5,"x",3,5,"x", 8,9,"x"}},{"x"},Infinity] {{{3, 1, 4}, {1, 5, 9, 2}}, {{6, 5}, {3, 5}, {8, 9}}} Andrzej Kozlowski Chiba, Japan
- References:
- splitting sublists
- From: hrocht@mail15.com
- splitting sublists