}
func pathExtractor(input string) [][][]byte {
- surroundRegex := "[^]()!#[ \\t:'\"]*"
+ surroundRegex := "[^]()!#[ \\t:'\"\\\\]*"
r := regexp.MustCompile("(" + surroundRegex + "[\\./]" + surroundRegex + ")")
temp := [][][]byte{}
temp = r.FindAllSubmatch([]byte(input), -1)
t.Errorf("Matches sentence", output)
}
+ output = GetAllMatches("/usr/bin/env\\", MatchOptions{})
+ if len(output) != 1 {
+ t.Errorf("Doesn't match escaped", output)
+ }
+ if output[0] != "/usr/bin/env" {
+ t.Errorf("Doesn't match escaped exactly", output)
+ }
+
output = GetAllMatches("!#/usr/bin/env", MatchOptions{})
if len(output) != 1 {
t.Errorf("Doesn't match shebang", output)