Skip to content
r.

fancy-regex

fancy-regex/fancy-regex · Public GitHub repository

Rust library for regular expressions using "fancy" features like look-around and backreferences. Has a mode which aims to be compatible with Oniguruma syntax.

Open project in RepoShelf

Open the project to try its demo, view the repository, or save it to your collection. Repository and demo actions use RepoShelf’s sign-in flow.

fancy-regex live demo screenshot
Captured from the live demo · 2026-11-06

About this project

Author-written excerpt from the project README.

A Rust library for compiling and matching regular expressions. It uses a hybrid regex implementation designed to support a relatively rich set of features. In particular, it uses backtracking to implement "fancy" features such as look-around and backtracking, which are not supported in purely NFA-based implementations (exemplified by RE2, and implemented in Rust in the regex crate).

Try it online in the fancy-regex playground - test and explore regular expressions with advanced features in your browser.

A goal is to be as efficient as possible. For a given regex, the NFA implementation has asymptotic running time linear in the length of the input, while in the general case a backtracking implementation has exponential blowup. An example given in Static Analysis for Regular Expression Exponential Runtime via Substructural Logics is:

Requirements and intended audience

A Rust library for compiling and matching regular expressions. It uses a hybrid regex implementation designed to support a relatively rich set of features. In particular, it uses backtracking to implement "fancy" features such as look-around and backtracking, which are not supported in purely NFA-based implementations (exemplified by RE2, and implemented in Rust in the regex crate).

Not recorded: account, external api key, paid service, self-hosting. Missing information does not mean there are no requirements.

Statements extracted from the author’s documentation · Checked 2026-10-20. Source: https://github.com/fancy-regex/fancy-regex/blob/main/README.md

Recorded maintenance information

Last recorded source update: 2026-11-03. Saved release: 0.19.2 · 2026-09-13. These dates do not guarantee ongoing maintenance.

Technologies
Rust
Licence
MIT. Generally permits modification and commercial use, subject to the licence’s notices and conditions.
Demo check
A public page loaded on 2026-11-06. This does not test every feature.

Browse related categories