From: Sergey Matveev Date: Wed, 3 Feb 2021 10:39:52 +0000 (+0300) Subject: Cyrillic support X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=5d36f53a2dfbb3df435d045e780ff880ae28c0b7;p=path-extractor.git Cyrillic support --- diff --git a/extractor.go b/extractor.go index a17bf8a..3183109 100644 --- a/extractor.go +++ b/extractor.go @@ -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) }