[a-zA-Z._@\d-]{8,}应该做的伎俩。有了额外的边界,那就是^[a-zA-Z._@\d-]{8,}$.^ Beginning of the line[a-zA-Z._@\d-] Group of the characters a-z, A-Z and ., -, _, @ as per your question as well as numbers (\d){8,} 8 to unlimited times$ End of the word您可以在此处的 regex101.com 上试用。