pattern match url in string / PERL

Am trying to remove urls from text strings in PERL. I have the following but it does not seem to work:

$remarks =~ s/www\.\s+\.com//gi;

In English, I want to look for www. then I want to delete the www. and everything after it until I hit a space (but not including the space).
It's not even deleting a simple occurrence of Example Web Page

Best way to do this?Any help would be hugely appreciated.

Kind regards.

Hi.

This regular expression seems to work:

#!/usr/bin/perl

# @(#) p1	Demonstrate pattern of "skip until character".

use warnings;
use strict;

my($debug);
$debug = 0;
$debug = 1;

my($t1, $remarks);

$t1="now www.domain.top will disappear and also www.junk is gone.";
$remarks = $t1;
$remarks =~ s/www[.][^ ]*[ ]/ /g;
print "result is :$remarks:\n";

exit(0);

producing:

% ./p1
result is :now  will disappear and also  is gone.:

See perl documentation, perldoc perldoc for how to find details ... cheers, drl

You already have several replies to this same question on another forum