HF RL Explorer

Task: Regex to Replace Multiple Spaces with a Single Space

Task: Regex to Replace Multiple Spaces with a Single Space: a task in Terminal-Lego-15k (Harbor dataset). Create a JavaScript solution that uses regular expressions to replace multiple consecutive spaces in a string with a single space.

The task

Create a JavaScript solution that uses regular expressions to replace multiple consecutive spaces in a string with a single space.

Part of PrimeIntellect/Terminal-Lego-15k.