Need simple algorithm for newbie
Jason Tudisco
tudisco at sexmagnet.com
Mon Nov 4 16:08:01 EST 2002
Thanks everyone for you help...
I also got this in my email.. Wanted to post it here also.. just in
case somebody else was interested.
thanks.. you guys have been lots of help
------------------
Note if the list origonally came from a file (one per line), then:
sed 's/^[^.]*\.\([^.]*\)\.\([^.]*\)/\1.\2/' <domains | grep -E
"(com|org|net)$"
| sort -u
tudisco at sexmagnet.com (Jason Tudisco) wrote in message news:<d1a9617c.0211040433.1eddb118 at posting.google.com>...
> I have a list of domains... Some of the domain names in the list look
> like this:
>
> groups.goodle.com
>
> The information I want is just google.com. I need to know the best way
> to do this.. for .com .net .org only.. and to strip the rest of the
> garbage.. like in this case.. get rid of groups in groups.google.com
>
> I need to parse though a huge list so it has to be optimized algorithm
>
> No need to write complete code.. Just get me in the right direccion..
> Still learning python and I am not sure what would be the fastest way
> to go about it..
More information about the Python-list
mailing list