# slice out the appropriate part of the string ($string) = $string =~ /(>.*?<\/pre>)/s;