# will probably "work" s/^'A guide to ([^']+)'$/'$1 - A Guide to'/; # but for it's fixed length: substr( $_ , -1,0, ' '.substr( substr($_,1,11,'') ,0,10) );