URL slug
What this is
Typical blog/CMS slug. Rejects leading/trailing hyphens and uppercase. Relax if you allow Unicode slugs.
/^[a-z0-9]+(?:-[a-z0-9]+)*$/cron-expression-builder Hello_World --bad--
FAQ
- Unicode?
- Add the u flag and \p{L} if you want non-ASCII slugs. Many CDNs still prefer ASCII.