diff --git a/chars.go b/chars.go index 717d29e..2302745 100644 --- a/chars.go +++ b/chars.go @@ -29,7 +29,7 @@ func getCharRange() string { charRange = charRange + pwSpecialChars } if config.excludeChars != "" { - regExp := regexp.MustCompile("[" + config.excludeChars + "]") + regExp := regexp.MustCompile("[" + regexp.QuoteMeta(config.excludeChars) + "]") charRange = regExp.ReplaceAllLiteralString(charRange, "") }