$done=0;
}
- if ($l =~ /\Q$attr\E/i) {
+ if ($l =~ /^\s*\Q$attr\E/i) {
if (!$obj || $cur_obj eq $obj) {
if (!$name || $cur_name eq $name) {
$l =~ s/\Q$attr\E\s*=\s*.+/$attr = $value/ig;
}
}
- if ($l =~ /Name\s*=\s*"?([\w\d\.-]+)"?/i) {
+ if ($l =~ /^\s*Name\s*=\s*"?([\w\d\.-]+)"?/i) {
$cur_name = $1;
}