Jump to content

How to use StringReplace


GWmellon
 Share

Recommended Posts

This should be straightfoward but it does not seem to work.

This is what I want to do:

Change "Vessel Name" in $testline to "Bubba Smith" and then to "Changed!"

Which clue am I missing?

$testline="<FONT FACE='Arial, sans-serif'><FONT SIZE=3>Vessel Name  </FONT></FONT>"
$vesselforpackslip="Changed!"
MsgBox(4096,"Test of stringreplace",$testline)
$result = StringInStr($testline, "Vessel Name")
MsgBox(4096,"result",$result)
If  $result > 0 then StringReplace($testline,"Vessel Name","Bubba Smith")
MsgBox(4096,"Test of stringreplace",$testline)
If  $result > 0 then StringReplace($testline,"Vessel Name ",$vesselforpackslip)
MsgBox(4096,"Test of stringreplace",$testline)
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...