Spinal Tap Case Regex

Hi, I’m trying to solve this by matching the empty string that follows a lowercase letter and precedes an uppercase one. Is this regexp possible?

Here is what I have so far:

function spinalCase(str) {
  const words = str.split(/-|_|\s|(?=[a-z])(?=[A-Z])/g);

Hello there,

I moved your question to its own topic because you were asking a question related to your own code for a challenge and were not answering the OP of the other thread. It is always best to create your own thread for you specific question(s). Also, it is advisable to use the Ask for Help button on the challenge, so it auto-populates with your current code and the challenge url.

Thank you.

Good to know, thanks!