Given a list as
list = {"2018-9-1",1,2,3,"2018-9-2","2018-9-3",4,5,6,"2018-9-5",7,8,9,"2018-9-6","2018-9-7",10,11,12,"2018-9-8",13,14,15,"2018-9-9",16,17,18}
or
list = {"2018-9-1","a","b","c","2018-9-2","2018-9-3","d","e","f","2018-9-5","h","i","j","2018-9-6","2018-9-7","k","l","m","2018-9-8","n","o","p","2018-9-9","q","r","s"}
how can adjacent date strings being pruned to get this result?
{"2018-9-1",1,2,3,"2018-9-3",4,5,6,"2018-9-5",7,8,9,"2018-9-7",10,11,12,"2018-9-8",13,14,15,"2018-9-9",16,17,18}
or
{"2018-9-1","a","b","c","2018-9-3","d","e","f","2018-9-5","h","i","j","2018-9-7","k","l","m","2018-9-8","n","o","p","2018-9-9","q","r","s"}
such that the function Partition
could be applied properly.
Thanks!
SequenceReplace[list, {_String, s_String} -> s]
? $\endgroup$