Regular Expressions 101

Community Patterns

domain_check

0

Regular Expression
Python

r"
^(?:([a-zA-Z][\w-]*)\.)(?:([\w-]*)\.)(?:([\w-]*)\.)(?:([\w-]*))$
"
gm

Description

check if a gives string is a domain 检查一个给定的字符串是不是域名

Submitted by anonymous - 3 years ago