regex - php regexp for national domains -


thare new nations domains , tlds "http://президент.рф/" - russian federation domains, or http://example.新加坡 singapore...

is there regex validate these domains?

have found one: what best regular expression check if string valid url?

but when try use 1 of expressions listed there - php getting overhitted :)

preg_match(): compilation failed: character value in \x{...} sequence large @ offset 81 

p.s.

1) last part solved @omnipotententity

2) main problem - validate international domain - still exists, because example regexp doesn't validate well.

no, there's no regexp validate domains. each tld has different rules unicode code points permissible within idns (if any). need very big lookup table have kept up-to-date know specific characters legal.

furthermore there rules whether left-to-right written characters , right-to-left characters can combined within single dns label.

btw, rfcs mentioned in other comments obsolete. approved set rfcs 5890 - 5895.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -