hello all,
I'm writing a whois script so I want to take in a suggested domain name $wholedomain and then split this into parts so that I can do the actual whois.
firstly, i've put the whole thing in lower case. Next I want to check for a www at the beginning and if it's there discard it. Then I want to put the name we're looking for into $name and the extension into $extn.
I think what I need is an ereg, so far I've got
(ereg ("(?w{3}).(containing no dots, being longer than this but shorter than that).(containing zero or more extra dots)", "$", "$domparts"))
and then I know I can call the elements of the $domparts array.
Despite having read the manual description, I'm not sure what the variable before the $domparts should be used for (sorry if this is obvious). As you can see, I'm also having some problems doing the pattern matching. Any and all help will be much appreciated, even if it's just to get me started. The more I look at something and the closer it gets to 5:30, the less it makes any sense . . .
thanks! rebecca