terra vidhal

Regex Tester

Component

About

A regex tester with live pattern validation, flag toggles, highlighted matches, a match list with capture groups and a replacement preview.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Regex Tester to your project and fits it to your theme.

Code

How Regex Tester is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

/**
 * PrequelUI Animate — MIT — https://prequeluianimate.terravidhal.me
 */

import { RegexTester } from "@/components/ui/regex-tester";

export default function RegexTesterDemo() {
  return (
    <main className="flex min-h-screen w-full items-start justify-center bg-background px-4 py-10 sm:px-6">
      <RegexTester
        defaultPattern={"\\b[\\w.+-]+@[\\w-]+\\.[\\w.]{2,}\\b"}
        defaultFlags="gi"
        defaultText="Write to support@fieldnotes.test or avery.cole@studio-mail.test before Friday. The ticket OPS-4821 is still open."
        defaultReplacement="[email]"
        title="Email pattern check"
        description="Validate a pattern against sample text and preview a safe rewrite."
      />
    </main>
  );
}

Dependencies

More by terra vidhal

View all
  • Project Timeline

    Project Timeline

    30
  • Kanban Board

    Kanban Board

    20
  • Gravity Stars Background

    Gravity Stars Background

    20
  • Booking Calendar

    Booking Calendar

    18
  • Notification Center

    Notification Center

    16
  • Audio Waveform

    Audio Waveform

    16
  • Kpi Counter

    Kpi Counter

    16
  • Topographic Lines

    Topographic Lines

    16

Explore more

Part of PrequelUI Animate — browse the full library on 21st.dev.