Returning a string after the second occurrence of a character and before the last occurrence of the same character with php

Viewed 3148

I have several strings similar to the following: ORG-000012 – Name of variation – Quantity: 12 Pack – $14.95

I need to remove all characters before the second hyphen and after the last hyphen with php. For example, the string above needs to return as: Name of variation – Quantity: 12 Pack

I have tried to use strpos and substr but I can't seem to get the correct setup. Please help!

3 Answers
Related