Commit f69088f7 by mushishixian

正则问题

parent f1f14bea
Showing with 0 additions and 2 deletions
......@@ -164,11 +164,9 @@ func splitAttrs(attrs string) (result []string) {
//提取参数
func extractAttr(attr string) []string {
fmt.Println(attr)
regexpUnit := strings.Join(getNeedCheckUnit(), "|")
r, _ := regexp.Compile("(\\d+[\\/\\d. ]*|\\d)(" + regexpUnit + ")" + "")
res := r.FindAllString(attr, 100)
fmt.Println(res)
return res
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment