data='115Z2113-3-777-55789ABC7777'
I have a string in the above format.
I want to remove 'ABC7777' from it. If there are any characters other then numbers after the right most '-' symbol, then only the string preceeding it should be retained.i.e., '115Z2113-3-777-55789ABC7777' should be stored in data. 'ABC7777' should be stripped off.
Please help me out with this.
Thanks & Regards,
Dinil