英文:
Where can I find all Golang regexp specifications?
问题
我尝试找到一份包含所有Golang正则表达式规则/规范/接受的语法的资源。然而,事实证明这并不是一项简单的任务。我找到了一些资源:
- https://code.google.com/p/re2/wiki/Syntax(来自regexp包的链接)
- https://regex-golang.appspot.com/assets/html/index.html
- https://github.com/StefanSchroeder/Golang-Regex-Tutorial/blob/master/01-chapter1.markdown
第一个链接几乎是我所需要的,但其中有很多复杂的地方,我不太理解其中的含义(没有图例和解释,只适用于那些已经了解一些的人)。以下是一些示例:
\d Perl字符类 #它与Perl有什么关系?
[[:name:]] 字符类中的命名ASCII类(≡ [:name:])
有人可以帮助我吗?
英文:
I try to find all in one golang regexp rules/specification/accepted syntax. However as it turned out - it's not simple task. There is some resource I've found:
- https://code.google.com/p/re2/wiki/Syntax (link from regexp package)
- https://regex-golang.appspot.com/assets/html/index.html
- https://github.com/StefanSchroeder/Golang-Regex-Tutorial/blob/master/01-chapter1.markdown
There first one it is almost what I need, but there is so many complicated moments where I just doesn't understand what's going on (no legenda and no explanations - only for those who already know something). See some examples below:
\d Perl character class #what does it have with Perl?
[[:name:]] named ASCII class inside character class (≡ [:name:])
Could anybody help me?
答案1
得分: 2
官方文档网址是http://golang.org/pkg/regexp/syntax/
Perl是一种编程语言。根据维基百科关于Perl的条目:
Perl 5在20世纪90年代末作为一种CGI脚本语言广受欢迎,部分原因是它无与伦比的正则表达式和字符串解析能力。
英文:
The official documentation is http://golang.org/pkg/regexp/syntax/
Perl in particular is a programming language. From the Wikipedia entry on Perl:
> Perl 5 gained widespread popularity in the late 1990s as a CGI scripting language, in part due to its unsurpassed regular expression and string parsing abilities.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论