Leser: 16
axp/linker.php?gr=2&id=2s6d23&url=http://www.google.de
1 2
$addr = 'axp/linker.php?gr=2&id=2s6d23&url=http://www.google.de/'; (my $new = $addr) =~ s/(\?)id=[^&]*&|&id=[^&]*/$1/;
1 2
my $addr = 'axp/linker.php?gr=2&id=2s6d23&url=http://www.google.de/'; (my $new = $addr) =~ s/(?<=\?)id=[^&]*&|&id=[^&]*//;
1 2 3 4 5 6 7 8 9
> re.pl $ use URI $ use URI::QueryParam $ my $u = URI->new('axp/linker.php?gr=2&id=2s6d23&url=http://www.google.de/', 'http') axp/linker.php?gr=2&id=2s6d23&url=http://www.google.de/ $ $u->query_param_delete('id') 2s6d23 $ "$u" axp/linker.php?gr=2&url=http%3A%2F%2Fwww.google.de%2F