标签: regex go
如何在golang正则表达式中使用变量作为模式。
wordVar := "demo" rgx := regexp.MustCompile(`\d+\t(\w+)`) // this work rgx := regexp.MustCompile(`\d+\t( + wordVar + )`) // this failed