node build fixed
This commit is contained in:
12
seanime-2.9.10/internal/util/regex.go
Normal file
12
seanime-2.9.10/internal/util/regex.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package util
|
||||
|
||||
import "regexp"
|
||||
|
||||
// MatchesRegex checks if a string matches a regex pattern
|
||||
func MatchesRegex(str, pattern string) (bool, error) {
|
||||
re, err := regexp.Compile(pattern)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
return re.MatchString(str), nil
|
||||
}
|
||||
Reference in New Issue
Block a user