fork(1) download
  1. #!/bin/bash
  2. sed 's/\(.*\)-[0-9]*-[0-9]*$/\1/' <<< "1234-5-8888-8978"
  3. sed -E 's/(.*)-[0-9]*-[0-9]*$/\1/' <<< "1234-8888-8978"
Success #stdin #stdout 0s 19632KB
stdin
Standard input is empty
stdout
1234-5
1234