But the backslash is causing a problem in the script. Everything after the backslash turns green, indicating that everything after it is considered a string.
olivierth What does a double backslash do? Wouldn't that give me : "blah\\blahblah\\etc." ?
As I understand it the "\" is a special character that is used to access more functionalities. So if you use a "\" in front of another character it changes the meaning of that character. For example, "\n" would be a line jump. And if use "\\" it is still a backslash with a special meaning. Therefore you have to at least use three backslashes to represent a correct/normal backslash. So in your case, you'd have to put it like this to make it work within the function.
olivierth What does a double backslash do? Wouldn't that give me : "blah\\blahblah\\etc." ?
As I understand it the "\" is a special character that is used to access more functionalities. So if you use a "\" in front of another character it changes the meaning of that character. For example, "\n" would be a line jump. And if use "\\" it is still a backslash with a special meaning. Therefore you have to at least use three backslashes to represent a correct/normal backslash. So in your case, you'd have to put it like this to make it work within the function.
The backslash is an escape character. It generally removes the special function of the following character. For example, a dollar sign or @ symbol may have a meaning in the interpreter. Another character with meaning is the quote symbol for defining strings. The backslash makes the quote symbol into a regular character instead of a string delimiter. This also applies to the backslash as an escape character. Since that is also a special meaning. The backslash escapes the escape character for a literal backslash. Sometimes there are multiple levels of string parsing going on such as with vex expressions. In this case there are multiple opportunities for the escape character to be consumed. This is why you might see three or four slashes in a row. Fun fact, there used to be a bug with backslashes in parameter expressions as part of otl definitions. This caused the number of slashes to double each time the otl was edited causing Houdini scenes to balloon in size. At one point I saw simple scene files take up a gig or more!