I have a string that contains some values I need to extract. Each of these values is surrounded by a common character.
What is the most efficient way to extract all of these values into an array?
For example, given the following string:
stackoverflowis%value1%butyouarevery%value2%
I would like to get an array containing value1 and value2