go语言-正则

func validateChineseName(name string) bool {
	match, _ := regexp.MatchString("^[\u4e00-\u9fa5]{2,4}$", name)
	return match
}
posted @ 2023-12-27 11:38  青烟绕指柔  阅读(9)  评论(0)    收藏  举报