Click building blocks to compose a pattern at your cursor position, with live match highlighting against your own sample text. For testing an existing regex instead, see the regex tester.
Clicking a building block inserts that token directly at your cursor's position in the pattern field — tracked via selectionStart/selectionEnd — then the pattern is recompiled and run against your sample text on every change. With the global flag checked, it loops exec() calls and manually advances lastIndex after zero-length matches to avoid an infinite loop; without it, only the first match gets highlighted.
exec() — that's a property of the regex itself, not a limitation added by this tool, so the builder mirrors exactly how the pattern behaves in real code.RegExp constructor throws, and the tool catches it and displays the JavaScript engine's own error message instead of highlighting anything — the same error you'd see from new RegExp() in a browser console.Free, unlimited, no account. If this saved you a paid tool, a small thanks is appreciated.
Say thanks — $3