in reply to
Regex Bug?
It's working perfectly, doing exactly what you ask. The second
.*?
minimally matches exactly zero characters after the question mark. Remove the minimal operator and it'll do as you intend:
$url =~ s/(.*?)\?.*/$1/;
Comment on
Re: Regex Bug?
Select
or
Download
Code
In Section
Seekers of Perl Wisdom