Why not just change the regexp to $rrstring =~ s/^((?:[^\n;]+|"(?:[^\n"\\]|\\[^\n])*")*);[^\n]*$/$1/mg;
What you presented only helps TXT records (even though it's not the only one that can have strings), and doesn't allow embeded quotes ("dd\"dd") even though the spec does.