Golang 支持的正在表達式是 https://github.com/google/re2/wiki/Syntax 注意這里提示 NOT SUPPORTED的。
工具
一些測試正則表達式的工具
推薦:
對這個站點的站長采訪:
http://www.infoq.com/cn/news/2013/01/RegEx101
https://regex-golang.appspot.com/assets/html/index.html 這里的源碼在 https://github.com/lukemauldin/rego
之前我一直使用的 RegexBuddy 需要win環境, 對go細節的支持不足, 不推薦。
教程
https://github.com/StefanSchroeder/Golang-Regex-Tutorial/tree/master/zh