From e77883262071c86c29f783e6ce3be98173398dc7 Mon Sep 17 00:00:00 2001
From: Edgar HIPP <hipp.edg@gmail.com>
Date: Sun, 30 Aug 2015 17:07:11 +0200
Subject: [PATCH] Remove = from match

---
 extractor.go | 2 +-
 pe_test.go   | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/extractor.go b/extractor.go
index f64fe5f..ad83d6e 100644
--- a/extractor.go
+++ b/extractor.go
@@ -9,7 +9,7 @@ type MatchOptions struct {
 }
 
 func pathExtractor(input string) [][][]byte {
-	surroundRegex := "[^]\\^\\+()!#[ \\t:'\"\\\\]*"
+	surroundRegex := "[^]\\^\\+()!#[ \\t:'\"\\\\=]*"
 	r := regexp.MustCompile("(" + surroundRegex + "[\\./]" + surroundRegex + ")")
 	temp := [][][]byte{}
 	temp = r.FindAllSubmatch([]byte(input), -1)
diff --git a/pe_test.go b/pe_test.go
index eefbbfe..719be92 100644
--- a/pe_test.go
+++ b/pe_test.go
@@ -13,6 +13,14 @@ func TestEverything(t *testing.T) {
 		t.Errorf("Matches sentence", output)
 	}
 
+	output = GetAllMatches("prefix=/usr/bin", MatchOptions{})
+	if len(output) != 1 {
+		t.Errorf("Should match =/usr/bin", output)
+	}
+	if output[0] != "/usr/bin" {
+		t.Errorf("Doesn't match statement correctly", output)
+	}
+
 	output = GetAllMatches("/var//log", MatchOptions{})
 	if len(output) != 0 {
 		t.Errorf("Matches double //", output)
-- 
2.51.0