Hi, all.
I'm having a relatively simple problem, trying to trim stuff off the end
of a URL.
INPUT:
http://www.wilbert.net
www.worful.com/after-text.htm
http://www.winston.com/argle.htm
www.windoze.net
DESIRED OUTPUT:
http://www.wilbert.net
www.worful.com
http://www.winston.com
www.windoze.net
Presently I'm trying the code:
if ($site =~ m{[^:/]/.*$}) {
$site =~ s{/.+}{};
}
which gives me the output:
http://www.wilbert.com
www.worful.com
http:
www.windoze.net
Obviously I'm doing something wrong for the third string, but I've pulled
out two or three hairs by now, trying to fix this. Anybody care to take a
shot?
TIA
Deane Rothenmaier
Programmer/Analyst
Walgreens Corp.
847-914-5150
Put three grains of sand in a vast cathedral, and the cathedral will be
more closely packed with sand than space is with stars. -- Sir James Jeans_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs