my $anzahl = $string =~ /width=(\d+)/; my $leerzeichen = ' ' x $anzahl;