---
title: "ClikaRT::regex"
sidebar_label: "regex"
description: "Namespace ClikaRT::regex"
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--namespace">namespace</span>

## Classes

| Name | Description |
| --- | --- |
| [`Regex`](./Regex.md) | A compiled regular expression. Copyable is NOT provided (a compiled program is heavy); move it. Build one with [`Regex::compile`](./Regex.md#compile). |

## `ClikaRT/regex/regex.h` {#regex-h}

```cpp
#include <ClikaRT/regex/regex.h>
```

A compiled regular expression for matching, searching, and rewriting text. Built on a linear-time engine: matching a pattern against a subject can never blow up on adversarial input the way a backtracking engine can, so it is safe to run over untrusted text (a request path, a user-supplied filter). The engine accepts a large PCRE-like syntax subset, but has **no backreferences and no lookaround**; a pattern needing those must be written a different way.

Compile a pattern once with `compile` and reuse the `Regex` for many matches. Compilation of a malformed pattern is the one fallible step (it returns a failure); matching and searching a compiled `Regex` are infallible and return their answer directly.
