views:

5740

answers:

1

How do you escape the forward slash character (/) in VBScript? For example, in the following string:

bob = "VU administration/front desk"
+6  A: 

You don't escape it: it doesn't mean anything special in php or vbscript, and therefore doesn't need to be escaped. The only character you need to escape in vbscript is the double quote, which escapes itself:

MyString = "He said, ""Here's how you escape a double quote in vbscript.  Slash (\) characters don't mean anything."""

Similarly, in php a backslash escapes itself, but a forward slash doesn't need any special handling.

Joel Coehoorn