Categorygithub.com/kshdb/regex_go
repositorypackage
1.0.0
Repository: https://github.com/kshdb/regex_go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

regex_go

golang与Per5和.net兼容的正则处理包

比较regexp和regex_go

Categoryregexpregex_go
Catastrophic backtracking possibleno, constant execution time guaranteesyes, if your pattern is at risk you can use the re.MatchTimeout field
Python-style capture groups (?Pre)yesno (yes in RE2 compat mode)
.NET-style capture groups (?re) or (?'name're)noyes
comments (?#comment)noyes
branch numbering reset (?|a|b)nono
possessive match (?>re)noyes
positive lookahead (?=re)noyes
negative lookahead (?!re)noyes
positive lookbehind (?<=re)noyes
negative lookbehind (?noyes
back reference \1noyes
named back reference \k'name'noyes
named ascii character class [[:foo:]]yesno (yes in RE2 compat mode)
conditionals (?(expr)yes|no)noyes

使用例子: