Hi, I have a String (x) which looks like this:
"Hello World\nHow are you?\n\\\\nserver1\\folder1\n\\\\nserver2\\folder2\n"
the highlighted "\n" are new line characters (4 of them), while other "\n" (2 of them) are part of the string.
I want to create a list of each string which looks like this :
("Hellow World" "How are you?" " \\nserver1\folder1" " \\nserver2\folder2 " )
How shall i go with it? Thx in advance.
1/ Avoid using \ characters in file paths, for this reason, if possible. You wouldn't have a problem if the string was:
"Hello World\nHow are you?\n//nserver1/folder1\n//nserver2/folder2\n"
You can use axlOSSlash, if you are in a Windows environment, to change the direction of the slash characters.
2/ rexCompile("\\\\") parseString(rexReplace(x, "/", 0), "\n")
In reply to eDave:
Hi Dave. yes, the axlOSSlash is a good bridging solution.
becasue working in Windows environment and that is a problem when need to
extract any server/ folder path. thx for the help.