RE2
A regular expression engine developed by Google that forgoes features such as backreferences and lookaround in order to guarantee linear-time matching performance. It is widely used across the Google API ecosystem.
Timeline (last 90 days)
Google's API ecosystem generally uses the RE2 regex engine, and RE2 deliberately omits features such as backreferences and lookaround
All Facts (7)
RE2由Google的Russ Cox开发,基于DFA和NFA的混合策略实现线性时间复杂度匹配,主动放弃了反向引用和环视断言的支持
90%UnverifiedRE2设置了内存使用上限默认8MB,超出时直接返回匹配失败
85%UnverifiedRE2的设计直接受到Ken Thompson在1968年发表的正则表达式编译算法的启发
85%UnverifiedCloudflare事后将其WAF的正则引擎迁移到了Rust的RE2风格引擎
85%UnverifiedRE2已被部署在Google搜索的查询解析、BigQuery的REGEXP_CONTAINS函数以及Cloudflare的WAF规则引擎中
80%UnverifiedRE2在Google内部被部署于代码搜索、BigQuery、日志分析系统等核心基础设施中,每天处理数十亿次正则匹配
75%UnverifiedGoogle's API ecosystem generally uses the RE2 regex engine, and RE2 deliberately omits features such as backreferences and lookaround
50%