Jump to content

text deleting, HELP needed


Recommended Posts

Look at the example given in the helpfile:

$text = StringReplace("this is a line of text", " ", "-")
$numreplacements = @extended
MsgBox(0, "New string is", $text)
MsgBox(0, "The number of replacements done was", $numreplacements)

Line 1 is using the command. It replaces " " (any spaces between words) with "-" (a hyphen)

$numreplacements = @extended - The command returns the new string, and the number of replacements performed is stored in @extended.

By running the command, the variable $text will be changed from "this is a line of text" to "this-is-a-line-of-text". You see this in the first message box.

The second message box you see is the extended information. In this case the number "5" is returned for this is the number of times the " " was found and replaced.

Link to comment
Share on other sites

Look at the example given in the helpfile:

$text = StringReplace("this is a line of text", " ", "-")
$numreplacements = @extended
MsgBox(0, "New string is", $text)
MsgBox(0, "The number of replacements done was", $numreplacements)

Line 1 is using the command. It replaces " " (any spaces between words) with "-" (a hyphen)

$numreplacements = @extended - The command returns the new string, and the number of replacements performed is stored in @extended.

By running the command, the variable $text will be changed from "this is a line of text" to "this-is-a-line-of-text". You see this in the first message box.

The second message box you see is the extended information. In this case the number "5" is returned for this is the number of times the " " was found and replaced.

Yes okey

But i want to replace text in a file

so i think i better use _ReplaceStringInFile

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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