X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=extractor.go;h=4dce18fbbb77923a2c2f77ca1b37c49821bb6730;hb=7506d22f2038de3e0352ece65362bb94e651be5e;hp=678f009e50a5b7c92375f0924744625036efac20;hpb=78145ceae98b896712ff6665f56a2f20f846d465;p=path-extractor.git diff --git a/extractor.go b/extractor.go index 678f009..4dce18f 100644 --- a/extractor.go +++ b/extractor.go @@ -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)