C++ Regex

Open-source C++ projects categorized as Regex

Top 11 C++ Regex Projects

  • hyperscan

    High-performance regular expression matching library

  • Project mention: Ask HN: Regex on a File or Stream | news.ycombinator.com | 2024-03-06

    Maybe some other PCRE-compatible implementation offers streaming. For instance, https://www.intel.com/content/www/us/en/developer/articles/t... says it has this feature, but of course given who it's from it may be tied to a single brand of CPU.

    github seems to be https://github.com/intel/hyperscan

  • ugrep

    NEW ugrep 5.1: an ultra fast, user-friendly, compatible grep. Ugrep combines the best features of other grep, adds new features, and searches fast. Includes a TUI and adds Google-like search, fuzzy search, hexdumps, searches nested archives (zip, 7z, tar, pax, cpio), compressed files (gz, Z, bz2, lzma, xz, lz4, zstd, brotli), pdfs, docs, and more

  • Project mention: Ugrep – a more powerful, ultra fast, user-friendly, compatible grep | news.ycombinator.com | 2023-12-30
  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • mXtract

    mXtract - Memory Extractor & Analyzer

  • RE-flex

    A high-performance C++ regex library and lexical analyzer generator with Unicode support. Extends Flex++ with Unicode support, indent/dedent anchors, lazy quantifiers, functions for lex and syntax error reporting and more. Seamlessly integrates with Bison and other parsers. (by Genivia)

  • Project mention: RE/flex 3.3.4 released - a scanner generator for C++ | /r/Compilers | 2023-05-31
  • ctpg

    Compile Time Parser Generator is a C++ single header library which takes a language description as a C++ code and turns it into a LR1 table parser with a deterministic finite automaton lexical analyzer, all in compile time.

  • vectorscan

    A portable fork of the high-performance regular expression matching library

  • Project mention: Accelerating Regular Expressions with AVX-512 at 1.5 GB/s/core | news.ycombinator.com | 2023-05-22

    Other options for accelerated regexes:

    https://github.com/VectorCamp/vectorscan

  • grab

    experimental and very fast implementation of a grep (by stealth)

  • Project mention: Ugrep – a more powerful, ultra fast, user-friendly, compatible grep | news.ycombinator.com | 2023-12-30

    Also look at https://github.com/stealth/grab from Sebastian Krahmer.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • matcheroni

    A minimalist single-header library for building pattern-matchers, lexers, and parsers.

  • Project mention: Matcheroni, a tiny C++20 header library for building lexers/parsers | /r/regex | 2023-07-06
  • hypergrep

    Recursively search directories for a regex pattern

  • Project mention: Ugrep – a more powerful, ultra fast, user-friendly, compatible grep | news.ycombinator.com | 2023-12-30

    Another issue with Hyperscan is that if you enable HS_FLAG_UTF8[1], which hypergrep does[2,3], and then search invalid UTF-8, then the result is UB.

    > This flag instructs Hyperscan to treat the pattern as a sequence of UTF-8 characters. The results of scanning invalid UTF-8 sequences with a Hyperscan library that has been compiled with one or more patterns using this flag are undefined.

    That's another issue you'll need to grapple with if you use Hyperscan. PCRE2 used to have this issue[4], but they've since defined the semantics of searching invalid UTF-8 with Unicode mode enabled. ripgrep 14 uses that new mode, but I haven't updated that FAQ answer yet.

    [1]: https://intel.github.io/hyperscan/dev-reference/api_files.ht...

    [2]: https://github.com/p-ranav/hypergrep/blob/ee85b713aa84e0050a...

    [3]: https://github.com/p-ranav/hypergrep/blob/ee85b713aa84e0050a...

    [4]: https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#why...

  • re2

    R interface to Google re2 (C++) regular expression engine (by girishji)

  • autohotkey-memory-scanner

    Scan process memory for a string matching your regex, using AutoHotKey.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

C++ Regex related posts

Index

What are some of the best open-source Regex projects in C++? This list will help you:

Project Stars
1 hyperscan 4,629
2 ugrep 2,429
3 mXtract 572
4 RE-flex 483
5 ctpg 448
6 vectorscan 408
7 grab 257
8 matcheroni 193
9 hypergrep 163
10 re2 25
11 autohotkey-memory-scanner 0

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com