I want to get the part of the string before the last occurance of "-",for example, \[code\]$string1 = 'a-b-c-de-f-gfgh';\[/code\]I want to get this part returned: a-b-c-de-f. Of course, I don't know the length of the last part.What is the easy way to do it?Thank you