fork download
  1. #!/bin/bash
  2. s='and-third-example-3.4.4-r0-20170804_101145'
  3. echo $s | sed 's/^\([^0-9-]*\(-[^0-9-]*\)*\)-\([0-9]\)/\1:\3/'
Success #stdin #stdout 0s 19632KB
stdin
Standard input is empty
stdout
and-third-example:3.4.4-r0-20170804_101145