Get the App
SLTechnology News&Howtos  ›  Computer Software News  › 

Domain name regular matching expression that can be used js version, php version

Shulou Source: shulou.com Published: 2022-05-31 10:43:05 11月25日 Update

Domain name information under php section

Function is_domain ($domain)

{

If (preg_match ("/ ^) ([0-9aSumz -] {1,}.)? [0-9aMuz -] {2,}. ([0-9aMuz -] {2,}.)? [aMuz] {2,} $/ I", $domain)

{

Return true

}

Else

{

Return false

}

}

Domain name regular expression js version

Function doseo () {

If (! $('domain'). Value.match (/ ^ ([a-z0-9 -] {1,}.)? [a-z0-9 -] {2,}. ([a-z0-9 -] {1,}.)? [a-z0-9] {2,} $/ I)) {

Alert ('Hello ~ ~ first of all, please enter the correct domain name: P')

$('domain'). Value ='

$('domain') .focus ()

Return

}

Tags: Domain name regular expression Information Hello input Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei vpn Xiaomi MariaDB MySQL