#!/bin/bashs='world-123.hello-abcdworld-124.goodworld-125.bye-abcdworld-126.bye'sed 's:-[^.-]*$::' <<< "$s"
Standard input is empty
world-123.hello world-124.good world-125.bye world-126.bye
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!