fixed pattern regex, fixed pattern AND operation

This commit is contained in:
2025-01-22 10:48:06 +01:00
parent a49e28518b
commit 479d8c274a
3 changed files with 11 additions and 7 deletions

View File

@@ -340,7 +340,7 @@ func (conf *Config) ApplyDefaults() {
func (conf *Config) PreparePattern(patterns []*Pattern) error {
// regex checks if a pattern looks like /$pattern/[i!]
flagre := regexp.MustCompile(`^/(.*)/([i!]+)$`)
flagre := regexp.MustCompile(`^/(.*)/([i!]*)$`)
for _, pattern := range patterns {
matches := flagre.FindAllStringSubmatch(pattern.Pattern, -1)