Build and explain a regex

A regex you'll actually understand and trust, with test cases.

Write a regular expression that {{requirement}}. Then: explain it token by token in a table, give 5 test strings that should match and 5 that shouldn't, point out the classic edge case most people miss for this pattern, and provide the same regex adapted for JavaScript, Python and PostgreSQL if they differ.

https://askai.fyi/@askai/build-and-explain-a-regexOpen in ChatGPT