Resources
Answers
Examples
Sign in
Get Started
What do you want to save?
Add Code snippet
New code examples
Javascript
2022-02-10 22:30:16
js strip multiple spaces
string = string.replace(/\s\s+/g, ' ');
Add solution
Javascript
2021-11-14 10:49:20
js replace all spaces
var string = "my name"; string = string.replace(/ /g,"_"); //returns my_name
Add solution
Javascript
2021-11-12 03:15:17
javascript replace space by underscore
var string = "my name"; string = string.replace(/ /g,"_"); //returns my_name
Add solution
C#
2021-10-22 19:48:14
replace space with underscore in c#
var string = "my name"; string = string.replace(/ /g,"_"); //returns my_name
Add solution
Javascript
2021-09-22 11:46:02
remove all numbers from string javascript
const string = "hello world 123"; // remove all digits from the string const newString = string.replace(/\d/g, "") // "hello world "
Add solution
Javascript
2021-09-18 15:51:05
replace multiple spaces with single space javascript
string = string.replace(/\s\s+/g, ' ');
Add solution
Javascript
2021-09-15 21:00:01
javascript replace all spaces
var string = "my name"; string = string.replace(/ /g,"_"); //returns my_name
Add solution
Best helpers
daily
weekly
monthly
for 3 months
Ranking is empty
This website uses cookies to make IQCode work for you. By using this site, you agree to our
cookie policy
Welcome Back!
Sign up to unlock all of IQCode features:
Test your skills and track progress
Engage in comprehensive interactive courses
Commit to daily skill-enhancing challenges
Solve practical, real-world issues
Share your insights and learnings
Sign in
E-mail
Password
Recover lost password
Log in
Or log in with
Not registered?
Sign up takes less than a minute
Create a Free Account
Sign up to unlock all of IQCode features:
Test your skills and track progress
Engage in comprehensive interactive courses
Commit to daily skill-enhancing challenges
Solve practical, real-world issues
Share your insights and learnings
Sign up
Email
Password
Sign up for free
Or sign up with
By signing up, you agree to the
Terms and Conditions
and
Privacy Policy
. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.