Learn regular expressions. Here's a not great example:

a =  "<lyrics artist=XXX album=XXX title=XXX> Lalalalala </lyrics>"
b = a.gsub(/\w*=\w*/  , "")
c = b.gsub(/\s/, "")
print  c, "\n"

<lyrics>Lalalalala</lyrics>


A slightly (yes very slightly) more realistic  example:

a =  '<lyrics artist="Prince" album="purplerain" title="computerblue">
Lalalalala </lyrics>'
b = a.gsub(/\w*="\w*"/  , "")
c = b.gsub(/\s/, "")
print  c, "\n"


<lyrics>Lalalalala</lyrics>


And what if there are spaces in a tag:

a =  '<lyrics artist="Prince" album="purplerain" title="Computer Blue">
Lalalalala </lyrics>'
b = a.gsub(/\w*=".*"/  , "")
c = b.gsub(/\s/, "")