http://qs321.pair.com?node_id=169346


in reply to Regex Bug?

Your question has been answered, but consider this instead:
$url =~ s/\?.*$//;
Instead of trying to capture everything UP to the question mark, just get rid of the question mark and everything AFTER it.

Also, consider the URI CPAN module:

use URI; my $uri = URI->new($url); print $uri->scheme, '://', $uri->host, $uri->path, "\n";
TIMTOWTDI! ;)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)