I have string(s) having delimiter underscore(_)
Input -
- ABC_TEST
- PQR_XYZ_TEST
- PQR_XYZ_ABC_TEST
Expected output -
- ABC
- PQR_XYZ
- PQR_XYZ_ABC
I want to remove only last part of the string. Can anyone suggest quicker way probably one-liner to achieve this?