]> Sergey Matveev's repositories - path-extractor.git/blobdiff - extractor.go
More matches (with _)
[path-extractor.git] / extractor.go
index 678f009e50a5b7c92375f0924744625036efac20..7cf69e4b8dcbe76cd58105a0fe49ef573d13f917 100644 (file)
@@ -9,7 +9,7 @@ type MatchOptions struct {
 }
 
 func pathExtractor(input string) [][][]byte {
-       surroundRegex := "[@~a-zA-Z/.]*"
+       surroundRegex := "[@~\\-_a-zA-Z/.0-9]*"
        r := regexp.MustCompile("(" + surroundRegex + "[\\./]" + surroundRegex + ")")
        temp := [][][]byte{}
        temp = r.FindAllSubmatch([]byte(input), -1)