Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Eliminate spaces

Status
Not open for further replies.

captedgar

Programmer
Dec 4, 2009
20
0
0
GB
Hi there

I'm trying to eliminate spaces when creating a folder through my scripts.
One of the section has a line called

Name=WScript.stdin.ReadLine().replace(/ +/,'');

which pass "Name" value to another function to create a folder and name it accordingly.
For some reason when i had the following through the cmd prompt as
My name is Test
The folder is getting created as MyName is Test while what i actually want is MyNameisTest

Can you advice please?

regards

 
>Name=WScript.stdin.ReadLine().replace(/ +/,'');
[tt]Name=WScript.stdin.ReadLine().replace(/ +/[red]g[/red],'');[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top