#!/bin/bashsed 's/\(.*\)-[0-9]*-[0-9]*$/\1/' <<< "1234-5-8888-8978"sed -E 's/(.*)-[0-9]*-[0-9]*$/\1/' <<< "1234-8888-8978"
Standard input is empty
1234-5 1234
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!