How to remove adjacent date strings in a list?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite
1












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!










share|improve this question



















  • 4




    Something like: SequenceReplace[list, _String, s_String -> s]?
    – Carl Woll
    Sep 22 at 4:17










  • @Call Woll Thanks!
    – Jerry
    Sep 22 at 4:24















up vote
3
down vote

favorite
1












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!










share|improve this question



















  • 4




    Something like: SequenceReplace[list, _String, s_String -> s]?
    – Carl Woll
    Sep 22 at 4:17










  • @Call Woll Thanks!
    – Jerry
    Sep 22 at 4:24













up vote
3
down vote

favorite
1









up vote
3
down vote

favorite
1






1





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!










share|improve this question















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!







list-manipulation string-manipulation stringreplace






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 22 at 5:35









Αλέξανδρος Ζεγγ

2,314725




2,314725










asked Sep 22 at 4:14









Jerry

35819




35819







  • 4




    Something like: SequenceReplace[list, _String, s_String -> s]?
    – Carl Woll
    Sep 22 at 4:17










  • @Call Woll Thanks!
    – Jerry
    Sep 22 at 4:24













  • 4




    Something like: SequenceReplace[list, _String, s_String -> s]?
    – Carl Woll
    Sep 22 at 4:17










  • @Call Woll Thanks!
    – Jerry
    Sep 22 at 4:24








4




4




Something like: SequenceReplace[list, _String, s_String -> s]?
– Carl Woll
Sep 22 at 4:17




Something like: SequenceReplace[list, _String, s_String -> s]?
– Carl Woll
Sep 22 at 4:17












@Call Woll Thanks!
– Jerry
Sep 22 at 4:24





@Call Woll Thanks!
– Jerry
Sep 22 at 4:24











2 Answers
2






active

oldest

votes

















up vote
5
down vote



accepted










There are many ways to accomplish this. One way uses SequenceReplace. First define a dateStringQ predicate:



dateStringQ = StringMatchQ[DatePattern["Year","Month","Day"]];


Your examples:



list1 = 
"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
;

list2 =
"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"
;


Using SequenceReplace:



SequenceReplace[
list1,
_String?dateStringQ, s_String?dateStringQ :> s
]

SequenceReplace[
list2,
_String?dateStringQ, s_String?dateStringQ :> s
]



"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



"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"







share|improve this answer




















  • why SequenceReplace[list2, _String?StringMatchQ[ DatePattern["Year", "Month", "Day"]], s_String?StringMatchQ[DatePattern["Year", "Month", "Day"]] :> s] doesnot work?
    – Jerry
    Sep 22 at 5:48










  • @Jerry The issue is precedence, _String?StringMatchQ[DataPattern["Year", "Month", "Day"]] is parsed as (_String?StringMatchQ)[DatePattern["Year", "Month", "Day"]] not _String?(StringMatchQ[DatePattern["Year", "Month", "Day"]]).
    – Carl Woll
    Sep 22 at 5:52










  • I see, Thanks very much!:)
    – Jerry
    Sep 22 at 6:00

















up vote
3
down vote













SequenceReplace is suitable, as @CarlWoll pointed out in the comment. But it needs further elaboration to work with both of your lists. Below is my version



stringPattern = RegularExpression["\d4-\d-\d"];
stringMatchQ = If[StringQ[#], StringMatchQ[#, stringPattern], False] &;
rule = a_?stringMatchQ, b_?stringMatchQ :> b;

SequenceReplace[list1, rule]
SequenceReplace[list2, rule]



"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



"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"







share|improve this answer






















    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "387"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f182340%2fhow-to-remove-adjacent-date-strings-in-a-list%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    5
    down vote



    accepted










    There are many ways to accomplish this. One way uses SequenceReplace. First define a dateStringQ predicate:



    dateStringQ = StringMatchQ[DatePattern["Year","Month","Day"]];


    Your examples:



    list1 = 
    "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
    ;

    list2 =
    "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"
    ;


    Using SequenceReplace:



    SequenceReplace[
    list1,
    _String?dateStringQ, s_String?dateStringQ :> s
    ]

    SequenceReplace[
    list2,
    _String?dateStringQ, s_String?dateStringQ :> s
    ]



    "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



    "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"







    share|improve this answer




















    • why SequenceReplace[list2, _String?StringMatchQ[ DatePattern["Year", "Month", "Day"]], s_String?StringMatchQ[DatePattern["Year", "Month", "Day"]] :> s] doesnot work?
      – Jerry
      Sep 22 at 5:48










    • @Jerry The issue is precedence, _String?StringMatchQ[DataPattern["Year", "Month", "Day"]] is parsed as (_String?StringMatchQ)[DatePattern["Year", "Month", "Day"]] not _String?(StringMatchQ[DatePattern["Year", "Month", "Day"]]).
      – Carl Woll
      Sep 22 at 5:52










    • I see, Thanks very much!:)
      – Jerry
      Sep 22 at 6:00














    up vote
    5
    down vote



    accepted










    There are many ways to accomplish this. One way uses SequenceReplace. First define a dateStringQ predicate:



    dateStringQ = StringMatchQ[DatePattern["Year","Month","Day"]];


    Your examples:



    list1 = 
    "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
    ;

    list2 =
    "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"
    ;


    Using SequenceReplace:



    SequenceReplace[
    list1,
    _String?dateStringQ, s_String?dateStringQ :> s
    ]

    SequenceReplace[
    list2,
    _String?dateStringQ, s_String?dateStringQ :> s
    ]



    "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



    "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"







    share|improve this answer




















    • why SequenceReplace[list2, _String?StringMatchQ[ DatePattern["Year", "Month", "Day"]], s_String?StringMatchQ[DatePattern["Year", "Month", "Day"]] :> s] doesnot work?
      – Jerry
      Sep 22 at 5:48










    • @Jerry The issue is precedence, _String?StringMatchQ[DataPattern["Year", "Month", "Day"]] is parsed as (_String?StringMatchQ)[DatePattern["Year", "Month", "Day"]] not _String?(StringMatchQ[DatePattern["Year", "Month", "Day"]]).
      – Carl Woll
      Sep 22 at 5:52










    • I see, Thanks very much!:)
      – Jerry
      Sep 22 at 6:00












    up vote
    5
    down vote



    accepted







    up vote
    5
    down vote



    accepted






    There are many ways to accomplish this. One way uses SequenceReplace. First define a dateStringQ predicate:



    dateStringQ = StringMatchQ[DatePattern["Year","Month","Day"]];


    Your examples:



    list1 = 
    "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
    ;

    list2 =
    "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"
    ;


    Using SequenceReplace:



    SequenceReplace[
    list1,
    _String?dateStringQ, s_String?dateStringQ :> s
    ]

    SequenceReplace[
    list2,
    _String?dateStringQ, s_String?dateStringQ :> s
    ]



    "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



    "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"







    share|improve this answer












    There are many ways to accomplish this. One way uses SequenceReplace. First define a dateStringQ predicate:



    dateStringQ = StringMatchQ[DatePattern["Year","Month","Day"]];


    Your examples:



    list1 = 
    "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
    ;

    list2 =
    "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"
    ;


    Using SequenceReplace:



    SequenceReplace[
    list1,
    _String?dateStringQ, s_String?dateStringQ :> s
    ]

    SequenceReplace[
    list2,
    _String?dateStringQ, s_String?dateStringQ :> s
    ]



    "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



    "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"








    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Sep 22 at 5:19









    Carl Woll

    59.4k278154




    59.4k278154











    • why SequenceReplace[list2, _String?StringMatchQ[ DatePattern["Year", "Month", "Day"]], s_String?StringMatchQ[DatePattern["Year", "Month", "Day"]] :> s] doesnot work?
      – Jerry
      Sep 22 at 5:48










    • @Jerry The issue is precedence, _String?StringMatchQ[DataPattern["Year", "Month", "Day"]] is parsed as (_String?StringMatchQ)[DatePattern["Year", "Month", "Day"]] not _String?(StringMatchQ[DatePattern["Year", "Month", "Day"]]).
      – Carl Woll
      Sep 22 at 5:52










    • I see, Thanks very much!:)
      – Jerry
      Sep 22 at 6:00
















    • why SequenceReplace[list2, _String?StringMatchQ[ DatePattern["Year", "Month", "Day"]], s_String?StringMatchQ[DatePattern["Year", "Month", "Day"]] :> s] doesnot work?
      – Jerry
      Sep 22 at 5:48










    • @Jerry The issue is precedence, _String?StringMatchQ[DataPattern["Year", "Month", "Day"]] is parsed as (_String?StringMatchQ)[DatePattern["Year", "Month", "Day"]] not _String?(StringMatchQ[DatePattern["Year", "Month", "Day"]]).
      – Carl Woll
      Sep 22 at 5:52










    • I see, Thanks very much!:)
      – Jerry
      Sep 22 at 6:00















    why SequenceReplace[list2, _String?StringMatchQ[ DatePattern["Year", "Month", "Day"]], s_String?StringMatchQ[DatePattern["Year", "Month", "Day"]] :> s] doesnot work?
    – Jerry
    Sep 22 at 5:48




    why SequenceReplace[list2, _String?StringMatchQ[ DatePattern["Year", "Month", "Day"]], s_String?StringMatchQ[DatePattern["Year", "Month", "Day"]] :> s] doesnot work?
    – Jerry
    Sep 22 at 5:48












    @Jerry The issue is precedence, _String?StringMatchQ[DataPattern["Year", "Month", "Day"]] is parsed as (_String?StringMatchQ)[DatePattern["Year", "Month", "Day"]] not _String?(StringMatchQ[DatePattern["Year", "Month", "Day"]]).
    – Carl Woll
    Sep 22 at 5:52




    @Jerry The issue is precedence, _String?StringMatchQ[DataPattern["Year", "Month", "Day"]] is parsed as (_String?StringMatchQ)[DatePattern["Year", "Month", "Day"]] not _String?(StringMatchQ[DatePattern["Year", "Month", "Day"]]).
    – Carl Woll
    Sep 22 at 5:52












    I see, Thanks very much!:)
    – Jerry
    Sep 22 at 6:00




    I see, Thanks very much!:)
    – Jerry
    Sep 22 at 6:00










    up vote
    3
    down vote













    SequenceReplace is suitable, as @CarlWoll pointed out in the comment. But it needs further elaboration to work with both of your lists. Below is my version



    stringPattern = RegularExpression["\d4-\d-\d"];
    stringMatchQ = If[StringQ[#], StringMatchQ[#, stringPattern], False] &;
    rule = a_?stringMatchQ, b_?stringMatchQ :> b;

    SequenceReplace[list1, rule]
    SequenceReplace[list2, rule]



    "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



    "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"







    share|improve this answer


























      up vote
      3
      down vote













      SequenceReplace is suitable, as @CarlWoll pointed out in the comment. But it needs further elaboration to work with both of your lists. Below is my version



      stringPattern = RegularExpression["\d4-\d-\d"];
      stringMatchQ = If[StringQ[#], StringMatchQ[#, stringPattern], False] &;
      rule = a_?stringMatchQ, b_?stringMatchQ :> b;

      SequenceReplace[list1, rule]
      SequenceReplace[list2, rule]



      "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



      "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"







      share|improve this answer
























        up vote
        3
        down vote










        up vote
        3
        down vote









        SequenceReplace is suitable, as @CarlWoll pointed out in the comment. But it needs further elaboration to work with both of your lists. Below is my version



        stringPattern = RegularExpression["\d4-\d-\d"];
        stringMatchQ = If[StringQ[#], StringMatchQ[#, stringPattern], False] &;
        rule = a_?stringMatchQ, b_?stringMatchQ :> b;

        SequenceReplace[list1, rule]
        SequenceReplace[list2, rule]



        "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



        "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"







        share|improve this answer














        SequenceReplace is suitable, as @CarlWoll pointed out in the comment. But it needs further elaboration to work with both of your lists. Below is my version



        stringPattern = RegularExpression["\d4-\d-\d"];
        stringMatchQ = If[StringQ[#], StringMatchQ[#, stringPattern], False] &;
        rule = a_?stringMatchQ, b_?stringMatchQ :> b;

        SequenceReplace[list1, rule]
        SequenceReplace[list2, rule]



        "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



        "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"








        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Sep 22 at 5:32

























        answered Sep 22 at 5:02









        Αλέξανδρος Ζεγγ

        2,314725




        2,314725



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f182340%2fhow-to-remove-adjacent-date-strings-in-a-list%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay