in reply to Re: Strip part of url
in thread Strip part of url

silent11:

That's a bit wordy, and you're using multiple regular expressions. If you make your regular expression a little more complex, you can do it like this:

my $url = "http://google.com/folder/1234.html"; my $numbers = $url; $numbers =~ s#^.*(\d+)[^/]*$#$1#; print $numbers;

...roboticus

When your only tool is a hammer, all problems look like your thumb.