為什么C:\\\\(由`引用) 正則表達式 不匹配"C:\\"和"C:\\\\"做什么?r, err := regexp.Compile(`C:\\\\`) // Not matchr, err := regexp.Compile("C:\\\\") // Matchesif r.MatchString("Working on drive C:\\") == true { fmt.Printf("Matches.") } else { fmt.Printf("No match.")}
- 1 回答
- 0 關注
- 264 瀏覽
添加回答
舉報
0/150
提交
取消
