Rust Regex Tester
Test patterns against the real Rust regex crate — compiled to WebAssembly, right in your browser.
Free, no signup — runs entirely in your browser on RegexTester.dev.
Annotation
Unable to parse pattern
gglobal: Don't return after first matchiignore case: Case insensitive matchingMatch Results
0 matchesNo matches found
Quick Reference
Test your Rust regex against the real engine below
Rust regex: what makes it different
- No lookaround / backrefs
- The crate rejects (?=…), (?<=…) and \1 at compile time, favoring predictable linear-time matching.
- Unicode-first
- Full \p{…} script and property support, with case-insensitive matching that respects Unicode simple case folding.
- Leftmost-first semantics
- Like Perl/Go, matches report the leftmost starting position with the first alternative that matches.
- Byte or UTF-8
- The crate can match on &str (UTF-8) or bytes, with ASCII restrictions ((?-u)) for byte modes.
Rust's regex crate follows the RE2 school: automaton-based, linear-time, with no backtracking — and therefore no backreferences or lookaround. What it offers instead is first-class Unicode (case folding, script properties, \p{…} classes), byte-oriented matching, and performance that routinely beats backtracking engines.
This tester runs the actual regex crate compiled to WebAssembly. If your pattern compiles here, it compiles in your Rust project; if it rejects lookbehind, Rust will too.
Rust regex FAQ
Does Rust regex support lookahead or backreferences?
No. The regex crate intentionally omits lookaround and backreferences to guarantee linear-time matching using finite automata. Patterns needing them require an external crate (like fancy-regex) or restructuring your approach.
What engine does Rust use for regex?
The regex crate, written in Rust. It compiles patterns to finite automata (a lazy DFA plus NFA simulations). This page runs that same crate compiled to WebAssembly.
How is Rust regex different from PCRE?
Rust's crate has no backreferences, lookaround, recursion, or possessive quantifiers, but guarantees O(n) match time and has stronger Unicode support. PCRE has the richer syntax but can backtrack catastrophically.