I need to validate a string that should contain DNS. Which regex is appropiate?
Only correct answer! IMMD.
Tim Pietzcker
2010-06-24 14:16:51
Yes but I got two down votes on it. :-(
Robert Love
2010-06-24 14:28:56
A:
(?=^.{1,254}$)(^(?:(?!\d+\.|-)[a-zA-Z0-9_\-]{1,63}(?<!-)\.?)+(?:[a-zA-Z]{2,})$)
Svisstack
2010-06-24 10:43:07