How to avoid slash (/) in VBScript?

How to escape the forward slash character ( /) in VBScript? For example, in the following line:

bob = "VU administration/front desk"
+3
source share
2 answers

You do not avoid this: it does not mean anything special in php or vbscript, and therefore it should not be avoided. The only character you need to escape in vbscript is the double quote that eludes itself:

MyString = "He said, ""Here how you escape a double quote in vbscript. Slash characters -- both forward (/) and back (\) -- don't mean anything, even when used with common control characters like \n or \t."""

Similarly, in php, the backslash is reset itself, but the slash does not require special handling.

+13
source

, . VBScript, PHP, , PHP ? VB / . / DOUBLE. DOUBLE DOUBLE, DOUBLE, , , - .

, VB / DOUBLE, , select replace (convert (char (10), pih.updateon, 111), .

Dim sQuery As String = "select replace(convert(char(10),pih.updateon,111),"/","-") as stopdate from myTable"

, , . , - . , , :

Dim sQuery As String = "select replace(convert(char(10),pih.updateon,111),'/','-') as stopdate from myTable"

, , , .

: VBScript VB , VB, VBScript , .

-

+2

All Articles