|
| |||||||
![]() | Welcome to iWEBTOOL Talk, where you talk about
webmaster-related stuff.
1 Register
2 Browse the board
3 Discuss whatever may interest you! | |||||||||||||
![]() |
| | Thread Tools | Search this Thread | Display Modes |
| | #1 |
| Retired Member Join Date: Dec 2005
Posts: 139
![]() | Hi, I have this regular expression: ^[[:alnum:]]+[\.]+[com|net|org|biz|co\.uk|us|info|jobs|travel|cc|cn|a t|be|de|hu|in|eu|jp|to|tv|ws|nu|name|mx]+$ What it does is checks to make sure a domain name has a valid syntax (e.g: domain.com, 4es.co.uk, this.net, etc) - but it doesn't allow hyphens. Some domains have hyphens. How can this regexp be altered so that it allows hyphens in the first part (before the period of the domain), but only one at a time (no two hyphens right next to each other), and not at the beginning or end of the first part of the domain? I'd REALLY appreciate any help, it's driving me mad. Thanks, -Matt
__________________ Retired Moderator/Member/Friend/Helper - it was great working with all of you! |
| |
|
| |||||||
(Threads which have no activity for more than 30 days are automatically closed.) |
| Quick Reply | ||
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Featured Links $7 Regular Links $5 For Lifetime Links! | linkpro | Links for Sale | 2 | 10-24-2006 10:09 PM |
| Regular User | sanderson | Introduce yourself | 5 | 10-11-2006 02:52 PM |