in reply to Strip part of url
my $url = "http://google.com/folder/1234.html"; my @parts = split /\//, $url; (my $numbers )= $parts[-1] =~ m/(\d+)/; print $numbers; # 1234
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Strip part of url
by roboticus (Chancellor) on Feb 11, 2011 at 20:53 UTC | |
Re^2: Strip part of url
by htmanning (Friar) on Feb 11, 2011 at 20:00 UTC |