1
0
Fork 0
mirror of https://github.com/seqizz/go-tools.git synced 2024-09-07 10:50:30 +02:00
What a mess..
This commit is contained in:
Gurkan 2017-09-24 23:33:29 +02:00 committed by GitHub
parent 0197f67e75
commit cc7702d5b7

View file

@ -161,7 +161,7 @@ func calculate(myMap map[string]int64, curLevel int, isDone bool, number int) (i
func isSliceContainsRgx(slice []string, text string) bool {
for _, a := range slice {
a = strings.Replace(a, "(", "\\(", -1)
a = strings.Replace(a, ")", "\\)", -1
a = strings.Replace(a, ")", "\\)", -1)
a = strings.Replace(a, "[", "\\[", -1)
a = strings.Replace(a, "]", "\\]", -1)
matched, _ := regexp.MatchString(a+".*", text)