$data =~ s/(?:(<pre>[\S\s]*?<\/pre>)|^(.+?)$)/($1)?$1:" $2"/mgei;