diff options
author | Özgür Kesim <oec-git@kesim.org> | 2015-07-28 10:34:56 +0200 |
---|---|---|
committer | Özgür Kesim <oec-git@kesim.org> | 2015-07-28 10:34:56 +0200 |
commit | 45d98cd506926c3131ae91b2a79fc9976c7529b6 (patch) | |
tree | de8c141cef388fea7e44bf2fd43577563186de64 | |
parent | f5b52917777870992444f819a9225126f6a5eb63 (diff) |
regexp for cleanup of quoted quotes
-rw-r--r-- | dict.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 } |