Answers for "replace space with underscore javascript globally"

16

js replace space with underscore

var string = "my name";
string = string.replace(/ /g,"_"); //returns my_name
Posted by: Guest on April-24-2020
0

replace space with underscore command line in file name

@echo off
Setlocal enabledelayedexpansion

Set "Pattern= "
Set "Replace=_"

For %%a in (*.exe) Do (
    Set "File=%%~a"
    Ren "%%a" "!File:%Pattern%=%Replace%!"
)

Pause&Exit
Posted by: Guest on October-26-2021

Code answers related to "replace space with underscore javascript globally"

Code answers related to "Javascript"

Browse Popular Code Answers by Language