#!/usr/bin/perl # your code goes here while (<>) { s/([^0-9]|^)-+([^0-9]|$)/$1 $2/g; }
2014-05-01 this-and this-and-that this-and-that-and-that-too -what-about-this or-this- and--these 2015-01-01
2014-05-01 this and this and that this and that and that too what about this or this and these 2015-01-01