]> Sergey Matveev's repositories - path-extractor.git/commitdiff
Cyrillic support
authorSergey Matveev <stargrave@stargrave.org>
Wed, 3 Feb 2021 10:39:52 +0000 (13:39 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 3 Feb 2021 10:39:52 +0000 (13:39 +0300)
extractor.go

index a17bf8a69cee0209dc03c37be21a073683c84dcc..3183109418b35e00912f87c1420e5a98e7e0b569 100644 (file)
@@ -9,7 +9,7 @@ type MatchOptions struct {
 }
 
 func pathExtractor(input string) [][]int {
-       surroundRegex := "[@~\\-_a-zA-Z/.0-9]*"
+       surroundRegex := "[@~\\-_a-zA-ZА-Яа-яЁё/.0-9]*"
        r := regexp.MustCompile("(" + surroundRegex + "[\\./]" + surroundRegex + ")")
        return r.FindAllSubmatchIndex([]byte(input), -1)
 }