API reference#
Signatures, parameters and returns render from the header comments (Breathe) and the binding’s docstrings (autodoc), never hand-transcribed. These pages arrange that matter by task and add the guarantees and tested examples. The exhaustive Doxygen tree has every symbol, including internals:
Browse the full Doxygen reference (/api).
Which type#
I want to… |
Type |
Page |
|---|---|---|
Compile a pattern and search |
|
|
Put the pattern in the type ( |
|
|
Know which of N patterns matched |
|
|
Tokenize: longest match wins |
|
|
Read groups and offsets |
|
Pattern syntax#
The pattern language itself – every construct and what it means, shared by all surfaces: Pattern syntax.
C++ core#
Match, search, anchor –
match()/fullmatch()/search()on basic_regex.Iterate every match –
find_iter(), a lazy range.Count without allocating –
count_matches().Replace or split –
replace()/split().Flags, the pattern literal, the exception – the auxiliary types: Support types.
Compatibility shims (C++)#
The ``std::regex`` face –
basic_regex, theregex_matchfamily,match_results, the iterators: compat-std.The RE2 face –
RE2andRE2::Set: compat-re2.
Python binding#
The re-compatible package, rendered from its docstrings:
Python API.
Rust & Go bindings#
Rust – the
regex-crate-shaped API on the linear engine: docs.rs/real-regex (rendered rustdoc).Go – the
regexp-shaped API: pkg.go.dev/…/bindings/go (rendered godoc).
Drop-in layers#
Migrating from std::regex, RE2, Python re, Rust regex or Go
regexp? The Drop-in section documents each
layer’s API, divergences and limits.