awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
google avatar

google/re2

0
View on GitHub↗
9,699 星标·1,231 分支·C++·BSD-3-Clause·10 次浏览

Re2

re2 is a C++ regular expression library designed for high-performance text processing. It is a non-backtracking regex engine that provides linear-time pattern matching, ensuring that execution time remains proportional to the size of the input string regardless of the pattern used.

The library supports UTF-8 and Latin-1 text encodings for searching and extracting substrings. It includes capabilities for multi-pattern optimization, allowing multiple regular expressions to be combined into a single representation to scan text for several patterns in one pass.

The project covers core regex operations including pattern compilation, full string validation, and the extraction of specific data through numbered or named grouping expressions.

Features

  • Linear-Time Regex Matchers - Prevents catastrophic backtracking by processing each input character a constant number of times regardless of the pattern.
  • Text Processing - Provides optimized searching and substring extraction for text encoded in UTF-8 and Latin-1.
  • High-Performance Text Processing - Ensures predictable execution time and memory usage when processing large volumes of text with regular expressions.
  • Capture Group Implementation - Supports capturing specific substrings from text using named or numbered regular expression grouping expressions.
  • C++ Regular Expression Libraries - Provides a fast, thread-safe C++ library for matching text patterns without exponential time complexity.
  • Finite Automata Regex Engines - Uses deterministic finite automata (DFA) to ensure that text matching time is linear relative to the input size.
  • Regular Expression Engines - Evaluates patterns against strings to identify or extract specific text sequences using a high-performance regex engine.
  • Text Search - Enables matching a single piece of text against multiple regular expression patterns simultaneously.
  • Regex - Implements an optimized internal bytecode representation for regular expression patterns to minimize repeated search overhead.
  • NFA-Based Matching - Employs non-deterministic finite automata (NFA) simulation to handle complex patterns while avoiding exponential backtracking.
  • Stateless Thread-Safe Matching - Separates compiled regex objects from execution state to allow multiple threads to perform matches simultaneously.
  • Multi-Pattern Matching Algorithms - Combines multiple regular expressions into a single shared state machine to scan text for several patterns in one pass.
  • Regex Encoding Support - Interprets patterns and input text as UTF-8 or Latin-1 to ensure accurate character matching across different encodings.
  • Regular Expressions - Safe, finite-state machine based library for efficient regex execution.

Star 历史

google/re2 的 Star 历史图表google/re2 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Re2 的开源替代方案

相似的开源项目,按与 Re2 的功能重合度排序。
  • rust-lang/regexrust-lang 的头像

    rust-lang/regex

    3,978在 GitHub 上查看↗

    This is a Rust regular expression library that provides a finite automata engine for searching and matching text patterns. It functions as a Unicode-compliant text scanner designed to guarantee linear time execution on all inputs to prevent catastrophic backtracking. The engine supports both single and multi-pattern search capabilities, allowing it to scan a piece of text for multiple regular expressions simultaneously. It operates on both strings and raw byte slices to identify matching text segments. The library covers text parsing, string validation, and pattern searching. It includes cap

    Rustautomataautomatondfa
    在 GitHub 上查看↗3,978
  • ziishaned/learn-regexziishaned 的头像

    ziishaned/learn-regex

    46,092在 GitHub 上查看↗

    This project is a regular expression learning resource and tutorial designed to teach the syntax and logic used to find, match, and manipulate text strings. It serves as a comprehensive guide and syntax reference for building complex search queries and data validation logic. The material covers the use of meta-characters, quantifiers, and boundary markers to define precise text match patterns. It includes instructional content on the logic of greedy and lazy matching, as well as the implementation of capture groups. The resource details a wide range of pattern matching capabilities, includin

    learn-regexregexregular-expression
    在 GitHub 上查看↗46,092
  • hanickadot/compile-time-regular-expressionshanickadot 的头像

    hanickadot/compile-time-regular-expressions

    3,814在 GitHub 上查看↗

    This library is a header-only C++ framework that performs regular expression evaluation and static string analysis during the compilation phase. By leveraging template metaprogramming and constant expression evaluation, it transforms pattern matching logic into static state machines, effectively shifting the cost of parsing and validation from runtime to build time. The project distinguishes itself by encoding text data directly into the type system, allowing for the validation and extraction of string content before a program ever executes. This approach ensures that regular expression patte

    C++
    在 GitHub 上查看↗3,814
  • ggreer/the_silver_searcherggreer 的头像

    ggreer/the_silver_searcher

    27,072在 GitHub 上查看↗

    The Silver Searcher is a high-performance text search utility and regex code search tool designed to locate strings and regular expressions within plain text and source code. It functions as a codebase pattern matcher that provides highlighted results with surrounding line context and respects standard ignore files. The utility includes specialized capabilities for searching inside zlib and lzma compressed archives. It implements high-throughput processing via parallel-threaded file scanning and just-in-time regular expression compilation. The tool's search and indexing surface covers output

    Cagccommand-line-tool
    在 GitHub 上查看↗27,072
查看 Re2 的所有 30 个替代方案→

常见问题解答

google/re2 是做什么的?

re2 is a C++ regular expression library designed for high-performance text processing. It is a non-backtracking regex engine that provides linear-time pattern matching, ensuring that execution time remains proportional to the size of the input string regardless of the pattern used.

google/re2 的主要功能有哪些?

google/re2 的主要功能包括:Linear-Time Regex Matchers, Text Processing, High-Performance Text Processing, Capture Group Implementation, C++ Regular Expression Libraries, Finite Automata Regex Engines, Regular Expression Engines, Text Search。

google/re2 有哪些开源替代品?

google/re2 的开源替代品包括: rust-lang/regex — This is a Rust regular expression library that provides a finite automata engine for searching and matching text… ziishaned/learn-regex — This project is a regular expression learning resource and tutorial designed to teach the syntax and logic used to… hanickadot/compile-time-regular-expressions — This library is a header-only C++ framework that performs regular expression evaluation and static string analysis… ggreer/the_silver_searcher — The Silver Searcher is a high-performance text search utility and regex code search tool designed to locate strings… virustotal/yara — YARA is a pattern matching engine and binary analysis tool used to identify and classify malware samples. It functions… intel/hyperscan — Hyperscan is a high-performance regular expression matching library that scans large volumes of data against thousands…