Tutorial by Examples

In vbscript, an object doesn't necessarily need a designated type. Similar to C#'s var variable. Dim ExampleString1 As String Dim ExampleString2
'Base string Dim exStr : exStr = " <Head>data</Head> " 'Left Dim res: res = Left(exStr,6) 'res now equals " <Head" 'Right Dim res: res = Right(exStr,6) 'res now equals "Head> " 'Mid Dim res: res = Mid(exStr,8,4) 'res now equals "data&quot...
Given a text file test.txt: Ford Jeep Honda The following script is processing this text file: 'Read in File Data to an array, separate by newline vb equivalent (vbcrlf) Dim car, cars Dim filefullname : filefullname = "C:\testenv\test.txt" cars = Split(CreateObject("Scriptin...
'Note: I use this method to extract non-html data in extracted GET telnet results 'This example effectively grabs every other vehicle that have start and finish 'characters, which in this case is "/". 'Resulting in an array like this: 'extractedData(0) = "/Jeep" 'extractedD...
Dim exStr : exStr = " <Head>data</Head> " Dim res res = Ucase(Replace(Mid(exStr, instr(exStr, ">")+1,4), "ata", "ark")) 'res now equals DARK 'instr(exStr, ">") returns 7 'Mid(" <Head>data</Head> ", 7+1,...

Page 1 of 1