Add a Regex Tester tool
メンテナーはふだん 1 日以内に返信
@piyusshhjangid がすでに取り組んでいます。
2026年10月19日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 74/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, nextjs, tailwindcss, typescript
調査の方向性
Start with lib/tools.ts and the complete tool structure in app/(tools)/base64/; also read the README’s “Add a tool” section. Implement and test pure logic in lib/regex-utils.ts and lib/__tests__/regex-utils.test.ts, then add the route, client UI, registry entry, and checklist items. Done means the listed tests and UI criteria pass and npm run lint && npm run test && npm run build succeeds.
索引モデルが issue の本文から書いたものです。
説明
Test a JavaScript regular expression against sample text, with highlighted matches, capture groups and a replace preview, all in the browser.
Route: /regex-tester
Suggested registry values: title Regex Tester, tagline Patterns, heroHeading Regex Tester with heroDim "", features ["Live matches", "Flags", "Capture groups", "Named groups", "Replace"].
Core logic in lib/regex-utils.ts
compileRegex(pattern, flags)returning{ ok: true, regex } | { ok: false, error }with a friendly messagefindMatches(regex, text, { limit = 1000 })returning{ matches: [{ text, index, end, groups, named }], truncated }. Always iterate a global copy of the regex and advancelastIndexon zero-length matches, so patterns likea*or^can't loop forever.replacePreview(regex, text, replacement)supporting$1and$<name>
v1 scope
- Pattern input with flag toggles (
g,i,m,s,u,y) - Test text with highlighted matches
- A match table with capture groups
- Replace preview
- Debounced input and a size cap on the test text (for example 100 KB)
Known limitation: catastrophic backtracking (for example (a+)+$ on a long string) can still freeze the tab in v1. Running matches in a Web Worker with a timeout is a good follow-up.
Out of scope for v1: a regex explainer, saved patterns, other regex flavours.
Where to look
lib/tools.ts(the registry and theToolinterface)app/(tools)/base64/(a complete tool to copy the structure from)- The "Add a tool" section of the README
Acceptance criteria
- Tests: zero-length patterns terminate, named groups are returned, invalid patterns and flags give
ok: false, hitting the limit setstruncated, and replacement with$1and$<name>works - UI as scoped above
- The standard new-tool checklist below is complete
Standard new-tool checklist
Everything (home grid, metadata, JSON-LD, OG image, sitemap, manifest, command palette) is driven by the registry in lib/tools.ts, so a new tool is mostly one registry entry plus a route.
- Add an entry to
TOOLSinlib/tools.tsfilling every field of theToolinterface (lib/tools.ts:19-52). UseapplicationCategory: "DeveloperApplication", reuse theCTA_PROJECTS/CTA_CONTACTconstants for the CTA links, and setsitemapPriority: 0.9like the other tools. - Pick
accentVarfrom the accent variables inapp/globals.css(the list is under "Adding a tool" in CONTRIBUTING.md). Take one that no tool uses yet, or the one the fewest tools have if they're all taken. Don't use--rose, it's the color of error messages. SetaccentHexto that variable's dark-theme value.heroDimmust be""or a substring ofheroHeading. - Write 3 or 4 FAQs (3 renders as a 3-column grid, see
components/shared/ToolPageLayout.tsx:25). KeepmetaTitleunder 60 characters andmetaDescriptionaround 150 to 160. - Keep
featuresandogDescriptionto plain Latin text and punctuation. The social card font is a subset with no arrow or symbol glyphs (lib/og.tsx:33-36). - Create
app/(tools)/<slug>/page.tsx,<Name>Client.tsx(with"use client"), andopengraph-image.tsx. Copypage.tsxandopengraph-image.tsxfromapp/(tools)/base64/and change the slug. - Put all pure logic in
lib/<name>.ts(no React, no DOM) with tests inlib/__tests__/<name>.test.ts. Tests can import with@/like the app does (vitest.config.tshas the alias). - Nothing leaves the browser: no network calls with user input, no analytics, no third-party scripts (the CSP in
middleware.tsblocks external scripts anyway). - Reuse shared pieces:
CopyButton,useToast, and optionallyuseRegisterCommandsfor command palette actions (example inapp/(tools)/base64/Base64Client.tsx:43-53). - Every input has a visible label or an
aria-label, the tool works with the keyboard alone, and it looks right in both light and dark themes. - Add the tool to the "Which tool?" dropdown in
.github/ISSUE_TEMPLATE/bug_report.yml. -
npm run lint && npm run test && npm run buildpasses.
One new tool per contributor, so more people get a chance. Add your registry entry at the end of TOOLS and rebase on develop before asking for review, since other new tools will touch the same file.
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off develop, and open your PR against develop with Closes #85 in the description.
- 主要言語
- TypeScript
- スター
- 1
- フォーク
- 9
- 平均マージ
- 9時間 50分
- マージ済み PR(30日)
- 105
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
codercops/toolbelt のほかの issue
-
JSONPath: big numbers in the results are rounded対応中かも @arxh80 が今日担当しました。 オープンbug hacktoberfest help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
codercops/toolbelt#238 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Color converter: the contrast ratio shows `4.50 : 1` while Normal AA says FAIL対応中かも @bercedev が今日担当しました。 オープンbug good first issue hacktoberfest
codercops/toolbelt#235 · コメント 5 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
JSON to YAML: control characters are written raw, so PyYAML and js-yaml can't read the output対応中かも @anurag2787 が今日担当しました。 オープンbug good first issue hacktoberfest
codercops/toolbelt#234 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
JSON formatter: Escape for code gives broken Python when the text has a run of single quotes対応中かも @anurag2787 が 1 日前に担当しました。 オープンbug good first issue hacktoberfest
codercops/toolbelt#233 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Add the URL encoder to the README, the home share card and package.json対応中かも @Abhishek764 が 3 日前に担当しました。 オープンdocumentation good first issue hacktoberfest
codercops/toolbelt#153 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
codercops/toolbelt の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
kunchenguid/gh-axi#220 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
prerender: wait for env-runner worker readiness before crawling対応中かも @sarankumar1325 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信