]> Sergey Matveev's repositories - path-extractor.git/blobdiff - extractor.go
Shouldn't match + nor ^
[path-extractor.git] / extractor.go
index 8e80d2c1378494bb1e05a8edb945e478573814fe..f64fe5fb1a5a0beb0b365c175050779d17137a80 100644 (file)
@@ -9,7 +9,7 @@ type MatchOptions struct {
 }
 
 func pathExtractor(input string) [][][]byte {
-       surroundRegex := "[^]()!#[ \\t:'\"\\\\]*"
+       surroundRegex := "[^]\\^\\+()!#[ \\t:'\"\\\\]*"
        r := regexp.MustCompile("(" + surroundRegex + "[\\./]" + surroundRegex + ")")
        temp := [][][]byte{}
        temp = r.FindAllSubmatch([]byte(input), -1)