togotools.top technical reference
Technical reference
Test regular expressions locally in your browser with real-time match results, capture groups, and replacement preview. Supports global, case-insensitive, multiline, and other flags.
Flags and syntax
| g (global) | Match all results, not just the first |
|---|---|
| i (ignore case) | Case-insensitive matching |
| m (multiline) | ^ and $ match start and end of each line |
| s (dotAll) | Allows . to match newlines |
| u (Unicode) | Correct Unicode code point and astral character handling |
Example: extract key-value pairs
Capture groups are referenced as $1, $2 in the replacement field. Named captures (?<key>...) can be referenced as $<key> in supporting engines.
Pattern: (\w+):(\w+)
Input: name:ada age:30 city:berlin
Matches:
name:ada -> $1=name $2=ada
age:30 -> $1=age $2=30
city:berlin -> $1=city $2=berlinLimits
- This tool uses the JavaScript regex engine. Some syntax (lookbehind, atomic groups) differs from PCRE, Python, or Java.
- Very large input text (over 1MB) may slow matching or freeze the browser.
- Catastrophic backtracking (ReDoS) can occur with nested quantifiers. Avoid patterns like (a+)+.
Frequently asked questions
Why does my regex work in Python but not here?
JavaScript regex does not support some PCRE features like lookbehind (?<=...) or (?P<name>...) syntax (JS uses (?<name>...)). Adjust the syntax for JavaScript.
Does it support Unicode property escapes?
Yes. With the u flag, you can use property escapes like \p{Letter} and \p{Number}. Requires a modern browser (ES2018+).