Slug regex पैटर्न

Slug के लिए JavaScript regex कॉपी और टेस्ट करें, उदाहरणों और regex tester के त्वरित लिंक के साथ.

Slug regex पैटर्न

पूरे value को validate करें

पूरे value के match होने की जाँच के लिए anchors का उपयोग करता है.

Regex: ^[a-z0-9]+(?:-[a-z0-9]+)*$

फ़्लैग: -

Text में खोजें

बड़े text block के अंदर matching fragments ढूँढता है.

Regex: \b[a-z0-9]+(?:-[a-z0-9]+)+\b

फ़्लैग: g

मिलने वाले उदाहरण

  • release-notes
  • hello-world-2

न मिलने वाले उदाहरण

  • Release-Notes
  • hello_world