Replace() problem


Recommended Posts

Using version 5.84 build 1636. NOTE: In all the examples below, everywhere there is a backslash one three backslash one zero it is really backslash zero one three backslash zero one zero but the forum software keeps removing the leading zero...

I have a string "MyString":

? MyString\13\\13\

I want to replace the carriage return line feed with ", ". I try:

global newString = Replace(MyString, "\13\10", ", ")
? newString\13\\13\

global newString = Replace(MyString, "\r\n", ", ")
? newString\13\\13\

Why can't I replace the carriage return line feed? What am I doing wrong? Thanks!

Link to comment
Share on other sites

Does your string actually have the eight ascii characters "1310" in it, or is that just from the monitor where it actually is the two characters for CRLF? I think the second because I did this:

global string x = "abcd1310def1310fdjd"

? replace(x, "1310"," ,")

and it worked. If it is that, then you want:

replace(MyString, chr(13) + chr(10) , ", ")

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.