| 1 |
# Features |
| 2 |
|
| 3 |
This crate supports several optional features that can be enabled or disabled: |
| 4 |
|
| 5 |
- **`std`** (enabled by default): Enables standard library support. Disable for `no_std` environments. |
| 6 |
- **`unicode`** (enabled by default): Enables Unicode support for character classes and word boundaries. |
| 7 |
- **`perf`** (enabled by default): Enables performance optimizations in the underlying regex engine. |
| 8 |
- **`perf-dfa-full`** (disabled by default): Let regex-automata eagerly build a fully compiled dense DFA for small patterns (and delegated fragments). Trades noticeably slower compiles and more memory for the fastest search engine; without it searches use the lazy DFA, which performs about the same on typical workloads. Mirrors the `regex` crate's `perf-dfa-full` opt-in. |
| 9 |
- **`variable-lookbehinds`** (enabled by default): Enables support for variable-length lookbehind |
| 10 |
assertions (e.g., `(?<=a+)`). Without this feature, only constant-length lookbehinds are supported. |
| 11 |
This feature uses reverse DFA matching from the `regex-automata` crate to efficiently handle |
| 12 |
variable-length patterns that don't use backreferences or other fancy features. |
| 13 |
- **`leftmost_longest`** (disabled by default): Enables support for switching on leftmost-longest match semantics in the `RegexBuilder`/`RegexOptionsBuilder`, as opposed to the usual leftmost-first. |