Answer the question
In order to leave comments, you need to log in
How to replace multiple spaces with a single character with a regular expression?
How to add a regular expression so that it does such a
"walk-some" from such a "walk_______some "
line ?
That is, it replaced all spaces with one character.
_______ are spaces)
Stopped at this
str.replace(/\s/g, '-');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question