Re: [PHP] Another parse problem

2010-06-26 Thread tedd
At 10:16 PM -0400 6/16/10, Daniel Brown wrote: I'm hoping Tedd will share his as well. Daniel: I'm embarrassed to show it -- it's not as slick and condensed as your's and Rob's http://www.webbytedd.com/b3/parse-domain-collective/ Please be kind. However, my code was to do something specif

Re: [PHP] Another parse problem

2010-06-16 Thread Daniel Brown
On Wed, Jun 16, 2010 at 21:42, Robert Cummings wrote: [snip!] > Anyways, those, by > virtue of your above description can have two or more parts and there's not > a simple way to extract that part without also extracting the sub-domain > portions. True. Not without some static rules and logi

Re: [PHP] Another parse problem

2010-06-16 Thread Robert Cummings
Daniel P. Brown wrote: On Wed, Jun 16, 2010 at 15:52, Robert Cummings wrote: Additionally, extracting top level domains is not so simple since it may have 2 or more parts. *Gasp!* The Great Cummings is incorrect. /me faints. Actually, ccTLD's are just the very last group of

Re: [PHP] Another parse problem

2010-06-16 Thread Daniel P. Brown
On Wed, Jun 16, 2010 at 15:52, Robert Cummings wrote: > > Additionally, extracting top level domains is not so simple since it may > have 2 or more parts. *Gasp!* The Great Cummings is incorrect. /me faints. Actually, ccTLD's are just the very last group of letters. For exampl

Re: [PHP] Another parse problem

2010-06-16 Thread Robert Cummings
Daniel P. Brown wrote: On Wed, Jun 16, 2010 at 13:22, tedd wrote: The given was to parse domain-names, but both routines pulled out sub-domains as well. Perhaps I am wrong in my understanding of what a domain name is, but I would normally look at sub domains as not part of the "domain name".

Re: [PHP] Another parse problem

2010-06-16 Thread Daniel P. Brown
On Wed, Jun 16, 2010 at 13:22, tedd wrote: > > The given was to parse domain-names, but both routines pulled out > sub-domains as well. Perhaps I am wrong in my understanding of what a domain > name is, but I would normally look at sub domains as not part of the "domain > name". Sub domains are si

Re: [PHP] Another parse problem

2010-06-16 Thread tedd
Rob and Daniel: As expected, both of your submission were excellent. If this was an assignment in one of my classes ("as if" I could teach either of you anything) you would both receive an A+. Daniel's routine also returned .ie TLD, but that was not stated as a requirement. Daniel's routin

Re: [PHP] Another parse problem

2010-06-14 Thread Daniel P. Brown
On Mon, Jun 14, 2010 at 09:14, tedd wrote: > Hi gang: > > Considering all the recent parsing, here's another problem to consider -- > given any text, parse the domain-names out of it. > > You may limit the parsing to the most popular TDL's, such as .com, .net, and > .org, but the finished result s

Re: [PHP] Another parse problem

2010-06-14 Thread Robert Cummings
tedd wrote: At 2:18 PM +0100 6/14/10, Ashley Sheridan wrote: On Mon, 2010-06-14 at 09:14 -0400, tedd wrote: Hi gang: Considering all the recent parsing, here's another problem to consider -- given any text, parse the domain-names out of it. You may limit the parsing to the most popular TDL's

Re: [PHP] Another parse problem

2010-06-14 Thread tedd
At 2:18 PM +0100 6/14/10, Ashley Sheridan wrote: On Mon, 2010-06-14 at 09:14 -0400, tedd wrote: Hi gang: Considering all the recent parsing, here's another problem to consider -- given any text, parse the domain-names out of it. You may limit the parsing to the most popular TDL's, such as .c

Re: [PHP] Another parse problem

2010-06-14 Thread Ashley Sheridan
On Mon, 2010-06-14 at 09:14 -0400, tedd wrote: > Hi gang: > > Considering all the recent parsing, here's another problem to > consider -- given any text, parse the domain-names out of it. > > You may limit the parsing to the most popular TDL's, such as .com, > .net, and .org, but the finished

[PHP] Another parse problem

2010-06-14 Thread tedd
Hi gang: Considering all the recent parsing, here's another problem to consider -- given any text, parse the domain-names out of it. You may limit the parsing to the most popular TDL's, such as .com, .net, and .org, but the finished result should be an array containing all the domain-names f