chore: optimize `regEnLetterAndMidline` regular (#6908)

* chore: optimize regular

* fix
This commit is contained in:
jessetang 2024-03-18 15:33:54 +08:00 committed by GitHub
parent f7ebf049da
commit 303de6e7c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ import (
)
// reg match english letters and midline
var regEnLetterAndMidline = regexp.MustCompile("^[0-9A-Za-z-_]+$")
var regEnLetterAndMidline = regexp.MustCompile(`^[\w-]+$`)
type CheckConstraint struct {
Name string