From 45d98cd506926c3131ae91b2a79fc9976c7529b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Kesim?= Date: Tue, 28 Jul 2015 10:34:56 +0200 Subject: [PATCH] regexp for cleanup of quoted quotes --- dict.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dict.go b/dict.go index 0c141b6..aab1d6e 100644 --- a/dict.go +++ b/dict.go @@ -5,6 +5,7 @@ import ( "fmt" "net/http" "os" + "regexp" "strings" ) @@ -70,9 +71,12 @@ func main() { ml = 40 } + re := regexp.MustCompile(`\('"„)`) for i, _ := range right { a := strings.Trim(right[i], `„"`) b := strings.Trim(left[i], `„"`) + a = re.ReplaceAllString(a, `$1`) + b = re.ReplaceAllString(b, `$1`) if a == "" { continue }