awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
google avatar

google/re2

0
View on GitHub↗
9,699 stars·1,231 forks·C++·BSD-3-Clause·20 views

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 history

Star history chart for google/re2Star history chart for google/re2

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Projects sharing features with Re2

These projects share indexed features with Re2. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • rust-lang/regexrust-lang avatar

    rust-lang/regex

    3,978View on 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
    View on GitHub↗3,978
  • ziishaned/learn-regexziishaned avatar

    ziishaned/learn-regex

    46,092View on 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
    View on GitHub↗46,092
  • hanickadot/compile-time-regular-expressionshanickadot avatar

    hanickadot/compile-time-regular-expressions

    3,814View on 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++
    View on GitHub↗3,814
  • ggreer/the_silver_searcherggreer avatar

    ggreer/the_silver_searcher

    27,072View on 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
    View on GitHub↗27,072
Compare all 30 related projects→

Frequently asked questions

What does google/re2 do?

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.

What are the main features of google/re2?

The main features of google/re2 are: 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.

Which projects share features with google/re2?

Projects with overlapping indexed features include: 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…