regex - Change Number Format -


I have several lines containing the XXXXXXXXX-XXX.XXX number format. I need a change number from XXXXXXXXX-XXX.XXX to XX.XXX.XXX.X-XXX.XXX

XXXXXXXXX-XXX.XXX = 15 numerical random number

Can anyone help me? Thanks in advance

This is ugly (because sed uses regex), but should work: < / P>

  sed 's / \ ([0-9] \ {2 \} \) \ ([0- 9] \ {3 \} \) \ ([0- 9] \ { 3 \} \) \ ([0-9] \) \ (- [[0-9] \ {3 \} \ [0-9] \ {3 \} \) / \ 1. \ 2 \ 3 \ 4 \ 5 / g \ ' 

Comments