> Bei mir funktioniert's leider nicht, dieser Ausdruck
> akzeptiert immer noch "www.domain".
Gewisse theoretische Vollst�ndigkeitseigenschaften regul�rer Ausdr�cke in
Ehren aber manchmal ist es einfacher, ein bisschen zu programmieren ;-)
Diese Funktion sollte dem nahe kommen, was Du m�chtest:
--- schnipp.inc ---
function ValidInetHostName(p_str)
dim l_ar
dim l_str
dim l_iLen
dim l_regexp
dim i
ValidInetHostName = false
l_ar = Split(LCase(p_str), ".")
if UBound(l_ar) < 2 then
exit function
end if
' top level domain
l_str = l_ar(UBound(l_ar))
l_iLen = Len(l_str)
if l_iLen <> 2 then
if l_iLen > 6 or l_iLen < 2 then
exit function
end if
if InStr(1,
".com.org.net.edu.int.biz.gov.mil.pro.coop.info.aero.arpa.name.museum.", "."
& l_str & ".") = 0 then
exit function
end if
end if
' subdomain and host parts
set l_regexp = new RegExp
l_regexp.Global = true
l_regexp.Pattern = "^[a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?$"
for i = 0 to UBound(l_ar) - 1
if not l_regexp.Test(l_ar(i)) then
exit function
end if
next
ValidInetHostName = true
end function
--- schnapp.inc ---
Gru�,
Alex
_______________________________________________
Coffeehouse Mailingliste, Postings senden an:
[EMAIL PROTECTED]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/coffeehouse