#!/bin/bashs='and-third-example-3.4.4-r0-20170804_101145'echo $s | sed 's/^\([^0-9-]*\(-[^0-9-]*\)*\)-\([0-9]\)/\1:\3/'
Standard input is empty
and-third-example:3.4.4-r0-20170804_101145
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!