Srting related help needed

Hello,

Need help, please help me out:

a string is "test-5248-87dd133a6d" or "abc-def-5248-87dd133a6d". I am trying to take out only the "test" or abc-def" from the string.


Or Trying to remove "-5248-87dd133a6d" part from the string. rem: -5248- is constant, "-87dd133a6d" is variable.

Thank you.


Srting related help needed
***

Jeehan

***