Reading substring

str = "; rel=“next” "

expected result: “i am good”
here how can i get my expected result

str = " ; rel=“next” "
str.replace("i am #{'good'.squeeze}")
p str

:grimacing::grimacing::grimacing:

:vulcan_salute: extra points for understanding the question in the first place

i have one string

input str = " great doing"
from this input string i need to extract the string which is in xml tags(<>) .

my expected result is :
puts str #output: hi how are you i am fine

I don’t see any xml tags in " great doing", do you?
You probably need to explain it a bit more? Can you give a proper sample string?

i solved my problom in other way, thanks for responding