return temp
}
+func stripParens(input string) string {
+ r := regexp.MustCompile("^\\((.*)\\)$")
+ temp := [][]byte{}
+ temp = r.FindSubmatch([]byte(input))
+ if len(temp) <= 1 {
+ return input
+ }
+ return string(temp[1])
+}
+
+func postProcess(input string) string {
+ input = stripParens(input)
+ return input
+}
+
func GetAllMatches(input string) []string {
matches := [][][]byte{}
result := []string{}
if isGitPath(s) {
s = replaceGitPath(s)
}
- result = append(result, s)
+ result = append(result, postProcess(s))
}
return result
}
if len(output) != 1 {
t.Errorf("Doesnt match surrounded by parens", output)
}
+ if output[0] != "user.js" {
+ t.Errorf("matches surrounded by parens badly", output)
+ }
output = GetAllMatches("var/")
if len(output) != 1 {