Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Add a Regex Tester tool

Abierto
#85 7 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@prakashNalla ya está trabajando en esto.

Desde el 22/10/2026.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
74/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript, nextjs, tailwindcss, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement hacktoberfest help wanted new tool

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 message
  • findMatches(regex, text, { limit = 1000 }) returning { matches: [{ text, index, end, groups, named }], truncated }. Always iterate a global copy of the regex and advance lastIndex on zero-length matches, so patterns like a* or ^ can't loop forever.
  • replacePreview(regex, text, replacement) supporting $1 and $<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 the Tool interface)
  • 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 sets truncated, and replacement with $1 and $<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 TOOLS in lib/tools.ts filling every field of the Tool interface (lib/tools.ts:19-52). Use applicationCategory: "DeveloperApplication", reuse the CTA_PROJECTS / CTA_CONTACT constants for the CTA links, and set sitemapPriority: 0.9 like the other tools.
  • Pick accentVar from the accent variables in app/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. Set accentHex to that variable's dark-theme value. heroDim must be "" or a substring of heroHeading.
  • Write 3 or 4 FAQs (3 renders as a 3-column grid, see components/shared/ToolPageLayout.tsx:25). Keep metaTitle under 60 characters and metaDescription around 150 to 160.
  • Keep features and ogDescription to 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"), and opengraph-image.tsx. Copy page.tsx and opengraph-image.tsx from app/(tools)/base64/ and change the slug.
  • Put all pure logic in lib/<name>.ts (no React, no DOM) with tests in lib/__tests__/<name>.test.ts. Tests can import with @/ like the app does (vitest.config.ts has the alias).
  • Nothing leaves the browser: no network calls with user input, no analytics, no third-party scripts (the CSP in middleware.ts blocks external scripts anyway).
  • Reuse shared pieces: CopyButton, useToast, and optionally useRegisterCommands for command palette actions (example in app/(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 build passes.

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.

Lenguaje dominante
TypeScript
Estrellas
1
Forks
9
Merge medio
9 h 9 min
PR fusionados (30 d)
118

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de codercops/toolbelt

Todos los issues de codercops/toolbelt

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.