Thread: Domain Keyword
View Single Post
Old 11-25-2007, 09:07 PM   #8 (permalink)
wGEric
The Acquainted
 
wGEric's Avatar
 
Join Date: Nov 2007
Posts: 166
Thanks: 0
wGEric is on a distinguished road
Default

php Code:
$szPattern = '/^(http\:\/\/)?([url]www.)?([/url][a-z0-9-\.]*)\.([a-z]{0,3})(\.[a-z]{0,2})?$/i';
Try that. It's probably buggy. You should be more strict in what you are allowing for each section. Because the domain name doesn't allow every character. The TLD doesn't allow every character and is usually only a certain length.
__________________
Eric
wGEric is offline  
Reply With Quote