|
@@ -205,6 +205,8 @@ func (e *ExtractTask) InitRulePres() {
|
|
|
var pattern string
|
|
|
if strings.Contains(tmp[0], "\\u") {
|
|
|
pattern, _ = strconv.Unquote(`"` + tmp[0] + `"`)
|
|
|
+ } else {
|
|
|
+ pattern = tmp[0]
|
|
|
}
|
|
|
if len(tmp) == 2 {
|
|
|
rinfo.RegPreBac = &ExtReg{Reg: regexp.MustCompile(pattern), Replace: tmp[1]}
|
|
@@ -240,6 +242,8 @@ func (e *ExtractTask) InitRuleBacks() {
|
|
|
var pattern string
|
|
|
if strings.Contains(tmp[0], "\\u") {
|
|
|
pattern, _ = strconv.Unquote(`"` + tmp[0] + `"`)
|
|
|
+ } else {
|
|
|
+ pattern = tmp[0]
|
|
|
}
|
|
|
if len(tmp) == 2 {
|
|
|
rinfo.RegPreBac = &ExtReg{Reg: regexp.MustCompile(pattern), Replace: tmp[1]}
|
|
@@ -294,6 +298,8 @@ func (e *ExtractTask) InitRuleCore() {
|
|
|
var pattern string
|
|
|
if strings.Contains(tmp[0], "\\u") {
|
|
|
pattern, _ = strconv.Unquote(`"` + tmp[0] + `"`)
|
|
|
+ } else {
|
|
|
+ pattern = tmp[0]
|
|
|
}
|
|
|
if len(tmp) == 2 {
|
|
|
rinfo.RegPreBac = &ExtReg{Reg: regexp.MustCompile(pattern), Replace: tmp[1]}
|
|
@@ -328,6 +334,8 @@ func (e *ExtractTask) InitRuleCore() {
|
|
|
var pattern string
|
|
|
if strings.Contains(tmp[0], "\\u") {
|
|
|
pattern, _ = strconv.Unquote(`"` + tmp[0] + `"`)
|
|
|
+ } else {
|
|
|
+ pattern = tmp[0]
|
|
|
}
|
|
|
if len(tmp) == 2 {
|
|
|
rinfo.RegPreBac = &ExtReg{Reg: regexp.MustCompile(pattern), Replace: tmp[1]}
|
|
@@ -367,6 +375,8 @@ func (e *ExtractTask) InitRuleCore() {
|
|
|
var pattern string
|
|
|
if strings.Contains(tmp[0], "\\u") {
|
|
|
pattern, _ = strconv.Unquote(`"` + tmp[0] + `"`)
|
|
|
+ } else {
|
|
|
+ pattern = tmp[0]
|
|
|
}
|
|
|
if len(tmp) == 2 {
|
|
|
epos := strings.Split(tmp[1], ",")
|
|
@@ -436,6 +446,8 @@ func (e *ExtractTask) InitPkgCore() {
|
|
|
var pattern string
|
|
|
if strings.Contains(tmp[0], "\\u") {
|
|
|
pattern, _ = strconv.Unquote(`"` + tmp[0] + `"`)
|
|
|
+ } else {
|
|
|
+ pattern = tmp[0]
|
|
|
}
|
|
|
if len(tmp) == 2 {
|
|
|
rinfo.RegPreBac = &ExtReg{Reg: regexp.MustCompile(pattern), Replace: tmp[1]}
|