Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

validate domain with regexp

$
0
0

Hi

I'm trying to create a script that validates domain names, but I can't get it to work 100%

  1. $string = "www.domain.com"
  2. $Check = StringRegExp($string, '([w]{3}.[0-9|a-z|æøå|-]*.[a-z|co.uk]{0,5}|[0-9|a-z|æøå|-]*.[a-z|co.uk]{0,5})', 1)

It checks both with www. and without www.

The code works except if i type "www.domain.c" then it still validates but it shouldn't but I can't find out how to fix it.

 

Can any of you help me :)

 

Cheers

c;") /Rex


Viewing all articles
Browse latest Browse all 12506

Trending Articles