Question : js replace space with underscore
Answered by : kees-van-beilen
var string = "my name";
string = string.replace(/ /g,"_"); //returns my_name
Source : | Last Update : Fri, 01 May 20
Question : javascript replace space by underscore
Answered by : vastemonde
// replaces space with '_'
str = str.replace(/ /g, "_");
// or
str = str.split(' ').join('_');
Source : | Last Update : Tue, 18 May 21
Question : replace underscore with space in js
Answered by : shehroze-ali
str.replace(/_/g, ' ');
Source : https://stackoverflow.com/questions/11810569/how-to-replace-underscores-with-spaces | Last Update : Fri, 30 Dec 22
Question : javascript replace all spaces
Answered by : wicked-wolf-kfrr7ktv1iyg
var str = 'a b c';
var replaced = str.split(' ').join('_');
Source : | Last Update : Tue, 15 Dec 20
Question : replace space with underscore in c#
Answered by : elated-eel-ftia9s3xnjdc
using System;
class Demo {
static void Main() {
String str, str2;
str ="Hello World !";
Console.WriteLine("String: "+str);
str2 = str.Replace(" ", "-");
Console.WriteLine("String (After replacing): "+str2);
}
}
Source : https://www.tutorialspoint.com/Chash-program-to-replace-all-spaces-in-a-string-with-20 | Last Update : Tue, 08 Jun 21
Question : replace underscore with space
Answered by : you
string_with_underscore = "hello_world"
string_with_space = string_with_underscore.replace("_", " ")
print(string_with_space)
Source : | Last Update : Tue, 19 Sep 23