Const
Matches strict snake_case strings.
A valid snake_case string:
a-z
0-9
_
SNAKE_CASE_REGEX.test("hello_world"); // trueSNAKE_CASE_REGEX.test("my_var_123"); // true Copy
SNAKE_CASE_REGEX.test("hello_world"); // trueSNAKE_CASE_REGEX.test("my_var_123"); // true
SNAKE_CASE_REGEX.test("Hello_world"); // falseSNAKE_CASE_REGEX.test("hello-world"); // falseSNAKE_CASE_REGEX.test("_hello_world"); // falseSNAKE_CASE_REGEX.test("hello__world"); // false Copy
SNAKE_CASE_REGEX.test("Hello_world"); // falseSNAKE_CASE_REGEX.test("hello-world"); // falseSNAKE_CASE_REGEX.test("_hello_world"); // falseSNAKE_CASE_REGEX.test("hello__world"); // false
Matches strict snake_case strings.
A valid snake_case string:
a-z) and numbers (0-9)_)