# README
regex_go
golang与Per5和.net兼容的正则处理包
比较regexp和regex_go
Category | regexp | regex_go |
---|---|---|
Catastrophic backtracking possible | no, constant execution time guarantees | yes, if your pattern is at risk you can use the re.MatchTimeout field |
Python-style capture groups (?Pre) | yes | no (yes in RE2 compat mode) |
.NET-style capture groups (?re) or (?'name're) | no | yes |
comments (?#comment) | no | yes |
branch numbering reset (?|a|b) | no | no |
possessive match (?>re) | no | yes |
positive lookahead (?=re) | no | yes |
negative lookahead (?!re) | no | yes |
positive lookbehind (?<=re) | no | yes |
negative lookbehind (? | no | yes |
back reference \1 | no | yes |
named back reference \k'name' | no | yes |
named ascii character class [[:foo:]] | yes | no (yes in RE2 compat mode) |
conditionals (?(expr)yes|no) | no | yes |