regexp for cleanup of quoted quotes
This commit is contained in:
parent
f5b5291777
commit
45d98cd506
4
dict.go
4
dict.go
@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -70,9 +71,12 @@ func main() {
|
|||||||
ml = 40
|
ml = 40
|
||||||
}
|
}
|
||||||
|
|
||||||
|
re := regexp.MustCompile(`\('"„)`)
|
||||||
for i, _ := range right {
|
for i, _ := range right {
|
||||||
a := strings.Trim(right[i], `„"`)
|
a := strings.Trim(right[i], `„"`)
|
||||||
b := strings.Trim(left[i], `„"`)
|
b := strings.Trim(left[i], `„"`)
|
||||||
|
a = re.ReplaceAllString(a, `$1`)
|
||||||
|
b = re.ReplaceAllString(b, `$1`)
|
||||||
if a == "" {
|
if a == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user