$ perl -pi.bak -e 's/(....)(..)(..)T(..)(..)(..)/$1-$2-$3-$4.$5.$6.000000/' /tmp/junk.txt
x="sample string"; r=x.slice(0,4) + ' : ' + x + ' : ' + x.slice(-4); alert( r );
Leave a comment: