my $addr = 'axp/linker.php?gr=2&id=2s6d23&url=http://www.google.de/'; (my $new = $addr) =~ s/(?<=\?)id=[^&]*&|&id=[^&]*//;