in reply to Help with Regexp substitution using variables

$string =~ s/$reg/'"'.$reg2.'"'/eeg;
is one of many possibilities

Dave.