diff --git a/src/test.go b/src/test.go index 5b20ce00c53d8f8d0a0bc897884a239ae02e70e6..2416a7b53592607e8c5de6f4c9898b2ae6591ebf 100644 --- a/src/test.go +++ b/src/test.go @@ -7,7 +7,7 @@ import ( func main() { text := ` df - FAIL scripts/tc-200.py + FAIL scripts\tc-200.py Step1: FAIL @step2010 第4次尝试登录 Checkpoint1: FAIL Expect Result CODE: @step2010期望结果, 可以有多行 @@ -20,8 +20,8 @@ func main() { dd` - str := "(?m:^\\s" + "FAIL\\sscripts/tc-200.py" + "\\n([\\s\\S]*?)((^\\s(PASS|FAIL))|\\z))" - // myExp := regexp.MustCompile("(?m:^\\s(?:PASS|FAIL) scripts/tc-200.py\n([\\s\\S]*?)((^\\s(PASS|FAIL))|\\z))") + str := "(?m:^\\s" + "FAIL\\sscripts\\\\tc-200.py" + "\\n([\\s\\S]*?)((^\\s(PASS|FAIL))|\\z))" + // myExp := regexp.MustCompile("(?m:^\\s(?:PASS|FAIL) scripts\\tc-200.py\n([\\s\\S]*?)((^\\s(PASS|FAIL))|\\z))") myExp := regexp.MustCompile(str) arr := myExp.FindStringSubmatch(text)