Build a regex tester with Tailwind CSS: a pattern input with live syntax validation and a flag toggle row (g, i, m, s), a test-string textarea, and a results panel showing the match count, capture groups as a numbered table, and the test string re-rendered with each match highlighted in alternating tints. Show match positions and lengths on hover, handle invalid patterns with an inline error instead of crashing, and offer a small cheat-sheet popover with common constructs.
提示词保持英文原文——直接粘贴进 Claude、Cursor、v0 或任何 AI 编程工具即可使用。