douzhaiyuan1731 2014-04-14 20:39
浏览 13
已采纳

运行golang代码时出错,缺少正则表达式软件包?

I'm trying to run some go (golang) code I have written and I keep on getting this error:

cannot find package "regex" in any of:
    /usr/local/go/src/pkg/regex (from $GOROOT)
    /gopath/src/regex (from $GOPATH)

Isn't regex included when one installs Go?

If not, where I can I find it and how can I install it?

  • 写回答

1条回答 默认 最新

  • duanmei1894 2014-04-14 20:43
    关注

    It's called regexp, not regex: http://golang.org/pkg/regexp/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?