From kde-devel Sun Aug 18 02:10:34 2002 From: Richard Garand Date: Sun, 18 Aug 2002 02:10:34 +0000 To: kde-devel Subject: Re: how to validate if a QString contains a FQNH? X-MARC-Message: https://marc.info/?l=kde-devel&m=102966158529330 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On August 17, 2002 02:32 pm, Carsten Niehaus wrote: > QRegExp exp("^(\\w{1,256})\\.([a-z]{2,6})$", false); > if (inp.contains( exp )) valid =3D TRUE; > else valid =3D false; > > But this is not working for eg www.kde.de. What is the most intelligent= way > to hadle this problem? The is QHostAddress but this is only for IPv4 an= d > IPv6 (takes only IPs (uint)). How about using "^(\\w{1,256})+\\.([a-z]{2,6})$" (added the +)? That woul= d=20 allow an unlimited number of subdomains before the top-level domain. - --=20 Richard Garand - r i c h a r d @ g a r a n d n e t . n e t ICQ: 12190132 - http://www.garandnet.net I love mankind ... It's people I hate. -- Schulz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9XwIkjuZKnjxs0fMRAhhkAKD6p/GXhOpPBA3NI7fuGmq9ExK9ZQCg3PZ6 ALF2bnBtcwaJdPMNPXwxIag=3D =3DEFPZ -----END PGP SIGNATURE----- >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<