~ $ devkit:regex-test
Regex Tester
Test JavaScript regular expressions with match highlighting and capture groups. Long-running tests stop after one second; up to 1,000 matches are shown.
Test text
Result
Run a test to highlight matches.
How to use Regex Tester
- Enter a JavaScript regex pattern without surrounding slashes, and set flags such as g, i or u.
- Paste test text and choose Test. Inspect highlighted matches, character indices and capture groups.
Example
Pattern: (?<word>[a-z]+) Flags: g Text: abc 123 def Matches: abc at index 0; def at index 8
Details and limitations
Uses your browser's JavaScript regex engine, not PCRE or Python syntax. Without g, only the first match is returned. Tests run in a worker and stop after one second. Results are limited to 1,000 matches; input limits are 200,000 text characters and 10,000 pattern characters.