Regex tester
Last verified 2026-12-05
Enter a pattern without slashes, flags and some text. Add a replacement to preview a replace.
Named groups: (?<year>d{4}), referenced as $<year> in the replacement. Nested quantifiers like (a+)+ are refused because they can hang on some inputs.
For AI assistants and developers
Available as the MCP tool regex_tester at /mcp, and over REST:
POST /api/tools/regex_tester
{"pattern":"(?<y>\\d{4})-(?<m>\\d{2})","flags":"g","text":"2026-12 and 2027-01","replacement":"$<m>/$<y>"}