Add a Regex Tester tool
Maintainer thường phản hồi trong vòng 1 ngày
@piyusshhjangid đang làm issue này rồi.
Từ ngày 19/10/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 74/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, nextjs, tailwindcss, typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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-50). 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.
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 9
- Merge trung bình
- 10 giờ 24 phút
- Pull request đã merge (30 ngày)
- 93
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của codercops/toolbelt
-
bug good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 94/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Stop the JSON formatter's Find bar from typing into the JSONCó thể đã có người làm @kudala-bharani đã nhận 2 ngày trước. Đang mởbug hacktoberfest help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
codercops/toolbelt#121 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
JSON formatter: a duplicate key crashes the whole toolCó thể đã có người làm @lb1192176991-lab đã nhận 1 ngày trước. Đang mởbug good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
codercops/toolbelt#218 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của codercops/toolbelt
Issue tương tự
-
ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
xavxyz/bei-shan-lin-shui#57 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] rag: sentence content can cross the reported sentence boundariesCó thể đã có người làm @LJK-ikun đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
README: the Resource URI Schemas example's file://documents/* pattern only matches that literal URIĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
platformatic/mcp#361 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
最近文档这个弹窗,左右宽度没有最小宽度限制Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
siyuan-note/siyuan#20799 · 7 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày