dickep Posted September 17, 2010 Share Posted September 17, 2010 OK, here is the text I have input: $myText = "1967 New Yorker, V-8,124"" wb" I want to replace the double quotes with the pipe character. I am using this line of code: MsgBox(0,"Before", "Text before: " & $myText) StringReplace($myText, '""', '|') MsgBox(0,"After", "Text after: " & $myText) However, when I look at the result, it has not changed. Why? What is wrong - besides me. I can't figure it out. Thanks for the help. E Link to comment Share on other sites More sharing options...
GMK Posted September 17, 2010 Share Posted September 17, 2010 Try this:$myText = '1967 New Yorker, V-8,124"" wb' MsgBox(0,"Before", "Text before: " & $myText) $myText = StringReplace($myText, '""', '|') MsgBox(0,"After", "Text after: " & $myText) Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted September 17, 2010 Share Posted September 17, 2010 @dickep Read the first MsgBox instead of just glance through it and you will notice something, the two "" is only " in the MsgBox. Why is that? I'm not gonna tell you when it's speller out perfectly in the helpfile. See Language Reference - Datatypes. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
dickep Posted September 17, 2010 Author Share Posted September 17, 2010 GMK, thanks for pointing out my error. AdmiralAlkex, I read that. I was just trying to see the pipe in the result but it did not show up. Both of you pointed out that I read the helpfile but did not READ the helpfile. Would have seen that you have put the "stuff" back into the variable. All is good now. Just need to finish the project and move the the next. E Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now