Znote (recipes)
  Get Znote  

🧪 Regex Playground

Test, debug, and understand regular expressions

 

🧪 Regex Playground

Test, debug, and understand regular expressions, directly in your note. Use this note to experiment with regular expressions, validate matches, and keep examples documented next to the regex itself.

No external website. No copy-paste. Just text → result.


✍️ Input

john.doe@email.com
support@company.io
invalid-email@
admin@test.co.uk

🔎 Regex

const regex = /([a-z0-9._%+-]+)@([a-z0-9.-]+\.[a-z]{2,})/gi;

⚡ Run (Ctrl+Enter)

const input = loadBlock("data");

const matches = [...input.matchAll(regex)].map(m => ({
  match: m[0],
  user: m[1],
  domain: m[2]
}));

printJSON(matches);
print(`${matches.length} match(es)`);

🧠 Ask AI

Use AI to understand or improve your regex.

Suggested prompt:

Explain this regex and suggest improvements.

📝 Notes

  • Used for email validation
  • Accepts subdomains
  • Rejects invalid formats

That’s it. A real dev tool — living inside a note.

Related recipes