# hanickadot/compile-time-regular-expressions

Compile Time Regular Expression in C++

Repository: https://github.com/hanickadot/compile-time-regular-expressions
Canonical: https://ross.abutalabs.com/products/compile-time-regular-expressions
Homepage: https://bsky.app/profile/hanicka.net
Language: C++
License: Apache-2.0
License Family: permissive
Topics: regular-expression, cpp17, cpp20, header-only, constexpr, compile-time, awesome, template-udl, pcre
Last push: 2026-07-11T21:34:06+00:00

## Health v2 (maintenance only)
Score: 79/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 92, release rhythm 51, longevity 100
- inputs: {"age_days": 3721, "days_push": 53, "days_rel": 117, "gap_med": 353, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3839, forks 209 (observed 2026-08-28T04:08:23.911823+00:00)

## What it is
A C++17/C++20 header-only library that evaluates regular expressions at compile time using constexpr and template metaprogramming. It supports matching, searching, capturing (including named captures), back-references, and most PCRE syntax with UTF-8 and Unicode property support.

## Use cases
- validate strings against a regex with zero runtime parsing overhead
- extract capture groups from text in C++ with type-safe results
- replace std::regex with a faster compile-time alternative
- match UTF-8 strings with Unicode property support
- use regex in constexpr contexts during compilation

## When to choose
- you know your regex patterns at compile time and want maximum performance
- you want a header-only dependency with no runtime regex compilation
- you need PCRE-like syntax in modern C++ (17/20)

## When to avoid
- you need to build regex patterns dynamically at runtime
- you rely on PCRE features like callouts, conditional patterns, or subroutines
- you need a regex engine for a language other than C++

## Facets
- artifact type: library
- maturity: stable
- function: parser, search-engine, developer-tools
- domain: parsers, developer-tools
- platform: cpp, cross-platform
- tags: regular-expressions, constexpr, compile-time, header-only, pcre, cpp17, cpp20, template-metaprogramming, algorithms

## Member repositories
- hanickadot/compile-time-regular-expressions (main) score 79

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:23.911823+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:26:14.970642+00:00, confidence not recorded.
  - readme: https://github.com/hanickadot/compile-time-regular-expressions (fetched 2026-08-28T04:08:23.911823+00:00, sha c2bb8e568d27)
  - homepage: https://bsky.app/profile/hanicka.net (fetched 2026-08-29T09:20:50.365821+00:00, sha 015059efa151)
- Data as of 2026-08-30T08:39:29.467469+00:00.
