I need to extract a string from within a string. I want all the string between the first underscore and the first hyphen. The catch is, there may not be a first underscore, in which case I want the string up to the first hyphen.
What is the simplest most efficient function to use for this?
What is the simplest most efficient function to use for this?