Add Regex Tester tool - #16
Merged
Merged
Conversation
A single-file, fully offline regex tester: enter a pattern, toggle flags (g/i/m/s/u/y), and see live-highlighted matches with numbered and named capture groups broken out. Uses the browser's native RegExp engine, persists state in localStorage, and follows the design system with full light/dark support. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014EWUwc8fQRjdPCdsB3rbec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this tool?
Regex Tester — a single-file, fully offline tool for anyone who works with text: developers, writers planning a find-and-replace, or note-takers building a search pattern. Type a regular expression, toggle its flags, and every match lights up in your test string in real time, with capture groups broken out below.
It's built entirely on the browser's own
RegExpengine, so nothing leaves the device — a natural companion to the existing text utilities in the catalog (Diff Checker, Text Case Converter, Word Counter).What it does
gimsuyas pill buttons; the active flags mirror into the/…/gidelimiter display.$1,$2, …) and named groups, marking empty vs. no-match cases distinctly.innerHTML), so test input can't inject markup. AMAX_MATCHESguard and a zero-length-matchlastIndexnudge keep the global loop from spinning.localStorage.Checklist
regex-tester/index.htmlwith all CSS + JS inline.fetch, orimport.screenshots/regex-tester.webp(vianpm run screenshot regex-tester).tools.json(dirmatches the folder name).catalogVersion(24 → 25).version: 1).npm run validatepasses locally.Notes for reviewers
:roottoken with aprefers-color-scheme: darkoverride, so it flips cleanly between light and dark. Verified in both schemes.tools.jsoncardcoloris#7c3aed(violet) — picked to stay distinct from neighbouring gallery entries; it does not relate to the tool's own azure accent.execcan't be interrupted in JS); the match-count and iteration guards bound the common cases.Generated by Claude Code