Regex tester
Interactively test JavaScript regular expressions.
- views
- —
- favorites
- —
Number of matches
Calculating…
test character
28
mode
g
Tool description and FAQ
Tool Guide
01JavaScript regex and flags
Fill in the expression without the slashes on both sides, choose g, i, m, s, u. Match highlighting and grouping are calculated in the local Worker to avoid common backtracking patterns that directly block the interface.
02Match and replace
All matches are processed after g is enabled; only the first item is matched when g is not enabled. Replacement supports JavaScript syntax such as $& and $1. Empty replacement means deleting the matching content; zero-width matching uses ∅ to mark the position.
FAQ
Q1Why does the expression time out?
Nested quantifiers and overly wide branches can produce large backtrackings. Reduce the input, add anchor points, or simplify the mode and try again; old replacement results will not continue to be displayed.
Q2Can the email or IP be fully verified by default?
Presets are for learning and extraction, not full protocol verification. For example the IP preset does not verify that each segment must be between 0–255.
Q3Will content be uploaded or saved automatically?
Input, results and files are only processed locally and are not uploaded or automatically saved. Copying and downloading are done on your own initiative.