#!/usr/bin/perl
$str = "'string; 'inside' another;"; 
$str =~ s/^'|'?;?$//g;
print $str;