Test, validate and match regular expressions
This regex matches the zero-width position immediately before any uppercase letter in a string, effectively finding the boundaries between words in camelCase. It uses two lookaheads: one to assert the next character is a letter, and another to assert it is uppercase. This is commonly used to insert hyphens or underscores before uppercase letters to convert camelCase to kebab-case or snake_case.