}
func pathExtractor(input string) [][][]byte {
- surroundRegex := "[^]\\^\\+()!#[ \\t:'\"\\\\=]*"
+ surroundRegex := "[@~a-zA-Z/.]*"
r := regexp.MustCompile("(" + surroundRegex + "[\\./]" + surroundRegex + ")")
temp := [][][]byte{}
temp = r.FindAllSubmatch([]byte(input), -1)
t.Errorf("Matches sentence", output)
}
+ output = GetAllMatches("'/usr/bin", MatchOptions{})
+ if output[0] != "/usr/bin" {
+ t.Errorf("Doesn't match statement correctly", output)
+ }
+
+ output = GetAllMatches("\"/usr/bin", MatchOptions{})
+ if output[0] != "/usr/bin" {
+ t.Errorf("Doesn't match statement correctly", output)
+ }
+
+ output = GetAllMatches("`/usr/bin", MatchOptions{})
+ if output[0] != "/usr/bin" {
+ t.Errorf("Doesn't match statement correctly", output)
+ }
+
+ output = GetAllMatches("€/usr/bin", MatchOptions{})
+ if output[0] != "/usr/bin" {
+ t.Errorf("Doesn't match statement correctly", output)
+ }
+
output = GetAllMatches("prefix=/usr/bin", MatchOptions{})
if len(output) != 1 {
t.Errorf("Should match =/usr/bin", output)