我有一个字符串列表:
['logstash-ech-ls2-example-2018.09.14',
'logstash-ech-ls1-dummy-2018.09.14',
'logstash-ech-ls1-example-2018.09.14',
'logstash-ech-ls2-dummy-2018.09.14',
'logstash-ech-ls1-bdn-tc03per-nd-2018.09.17',
'logstash-ech-ls2-bdn-tc03per-nd-2018.09.17'],
我需要在日期前移动“ -ls2”,以便获得如下列表:
['logstash-ech-dummy-ls2-2018.09.14',
'logstash-ech-example-ls2-2018.09.14',
'logstash-ech-example-ls1-2018.09.14',
'logstash-ech-dummy-ls1-2018.09.14',
'logstash-ech-bdn-tc03per-nd-ls2-2018.09.17',
'logstash-ech-bdn-tc03per-nd-ls1-2018.09.17']