Const
Matches strict kebab-case strings.
A valid kebab-case string:
a-z
0-9
-
KEBAB_CASE_REGEX.test("hello-world"); // trueKEBAB_CASE_REGEX.test("my-variable-123"); // trueKEBAB_CASE_REGEX.test("Hello-world"); // falseKEBAB_CASE_REGEX.test("hello_world"); // falseKEBAB_CASE_REGEX.test("-hello-world"); // falseKEBAB_CASE_REGEX.test("hello--world"); // false Copy
KEBAB_CASE_REGEX.test("hello-world"); // trueKEBAB_CASE_REGEX.test("my-variable-123"); // trueKEBAB_CASE_REGEX.test("Hello-world"); // falseKEBAB_CASE_REGEX.test("hello_world"); // falseKEBAB_CASE_REGEX.test("-hello-world"); // falseKEBAB_CASE_REGEX.test("hello--world"); // false
Matches strict kebab-case strings.
A valid kebab-case string:
a-z) and numbers (0-9)-)