[thelist] some coding help request!

Erick Papadakis erick_papadakis at yahoo.com
Thu Jul 18 03:08:01 CDT 2002


hello, i hope someone can help me with this perl coding (cgi). i am not
good with regexp etc, not even sure if that is the best solution to my
problem. ideas/advice most most appreciated!

basically i want to know how i can take a string that is formatted like a
link and find out:

1. the domain name
2. all the words in the string (non-symbols, and non-numbers, only
characters) which are NOT from an exclusion list.

let me explain. sorry if the following wraps:

my $string = "http://www.cnn.com/2002/fbi.exec.binladen/index.html";
my $exclusion_list = "index|html|www|http|https|com|net|org";


so, all i want is

1. name of domain, but this could be without www -- "cnn.com", or could
be something like "robots.cnn.com"

     cnn

2. words in the string that are not in the exclusion list

    fbi, binladen, exec

please help!

thanks/erick

__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com



More information about the thelist mailing list