I'm trying to split a string like this: "abcde${variable}zzz"

I want to split the string so I can replace the variable with a value. I don't know ahead of time what the variable name will be so that's why I was trying to avoid using "replace".