Test regular expressions in real-time. Free online tool, no login, no sign-up.
LocalPersonal data security
Loading Tool Engine
Usage Guide & Tech FAQ
Step-by-step help & technical notesUsage Guide
- Enter the text to match in the test area.
- Write the regex and flags (e.g., g/i/m).
- Check highlights and match counts to debug quickly.
- If you see a syntax error, fix grouping/escaping and retry.
- For large haystacks, test on a small excerpt first to avoid catastrophic backtracking freezes.
- When using capture groups, align replacement templates (`$1`, `$2`) with your engine’s rules.
- For multiline logs, enable multiline mode and verify whether `^/$` anchor per line as intended.
- Unicode property escapes require engine support; fall back to explicit ranges if needed.
- Test empty strings, whitespace-only, and very long inputs for production validation regexes.
- Port the final pattern into unit tests to prevent regressions.
- Read the title and description first to confirm this utility matches your task (avoid using the wrong tool and misinterpreting output).
- Paste or type input in the editor; if a sample/template is provided, load it first to learn the expected output shape.
Related Tech Knowledge
- Regex parsing and matching run in the browser.
- Flags change behavior: global, case-insensitive, multiline, etc.
- Common issues are missing escapes or unclosed groups/quantifiers.
- Validate with small samples first for predictable output.
- Catastrophic backtracking often comes from nested quantifiers like `(.+)+`; prefer lazy quantifiers or restructuring.
- JS RegExp differs from PCRE/Java; verify dialect when porting to another runtime.
- Lookbehind and other advanced features may be unavailable on older engines.
- Regex is not a full parser for nested formats (e.g., arbitrary HTML); use dedicated parsers instead.
- Prefer compiling RegExp once in hot paths instead of rebuilding from strings repeatedly.
- User-supplied regex can be a ReDoS vector—rate-limit and bound complexity on servers.
- Core parsing and computation run in your browser; by default your raw business payload is not persisted to this site’s servers (see on-page privacy notes).
- The pipeline is typically: read input → parse (lexical/syntactic/structured) → transform → render; failures aim to be diagnosable.