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/;
|
---|
In Section
Seekers of Perl Wisdom