]> Sergey Matveev's repositories - path-extractor.git/blobdiff - extractor.go
Add multiple tests and fix them
[path-extractor.git] / extractor.go
index 8e80d2c1378494bb1e05a8edb945e478573814fe..678f009e50a5b7c92375f0924744625036efac20 100644 (file)
@@ -9,7 +9,7 @@ type MatchOptions struct {
 }
 
 func pathExtractor(input string) [][][]byte {
-       surroundRegex := "[^]()!#[ \\t:'\"\\\\]*"
+       surroundRegex := "[@~a-zA-Z/.]*"
        r := regexp.MustCompile("(" + surroundRegex + "[\\./]" + surroundRegex + ")")
        temp := [][][]byte{}
        temp = r.FindAllSubmatch([]byte(input), -1)