Jump to content

Removing spaces


 Share

Recommended Posts

I have got a File in which i store some data.

eg,This is a party and i want a drink.

The spaces are at random places.I want to remove the spaces between the words and add a comma.

There mey be more than one space between two words.

Can anybody help me?

Edited by gunmaster
Link to comment
Share on other sites

I have got a File in which i store some data.

eg,This is a party and i want a drink.

The spaces are at random places.I want to remove the spaces between the words and add a comma.

There mey be more than one space between two words.

Can anybody help me?

If you was using version 3 this is how I would do it

$text = StringStripWS("this is   a   line   of   text", 4)
$text1 = StringReplace($text, " ", ",")
MsgBox(0, "New string is", $text1)


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

I can say pretty certain that it ain't possible directly with v2, but there might be command line

program that can do what you want...

If you can't find any, I'm sure someone here at the forum are happy to create one in v3 for you.

Of course, you can also simply just change to v3 :P

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...