The VBScript Network and Systems Administrator's Cafe:

String manipulation


January 30, 2009  1:30 AM

Easy String Searches with the VBScript Instr function

Posted by: Jerry Lees
InStr function, Scripting, string, String manipulation, strings, VBScript

I recently had a situation where I needed to find string inside a string to parse the larger string into usable and separate chunks of data. In writing this script, I realized I've not shared this gem of a function with you previously... and it really makes matters easier when you are...

December 29, 2008  3:21 PM

Using special characters in VBScript strings

Posted by: Jerry Lees
ASCII, Special Characters, string, String manipulation, strings, VBScipt, working with variables

I just realized I've been using Visual Basic String constants in my scripts with little to no explanation. We'll rectify that situation right now! ;-) When dealing with strings in VBScript, you occasionally need to add formatting characters to a string, so that when it is displayed on the screen...

December 2, 2008  12:55 AM

Very simple encryption example with VBScript

Posted by: Jerry Lees
3des, decrypt, decrytption, encrypt, encryption, mid, Reverse Strings, RSA, string, String manipulation, StrReverse, Toolkit, VBScript

I previously mentioned a routine that I wrote to encrypt a string. Now, before the security folks look at the code... understand this: This is intended only to obscure a string from a casual prying eye. It is NOT intended to be a replacement for true encryption like 3DES and...

November 28, 2008  5:07 PM

Reversing a String with VBScript… the easy way!

Posted by: Jerry Lees
Reverse Strings, String manipulation, StrReverse, VBScript

In a previous post, entitled Reversing a string with VBScript using the mid function, I shared a piece of code with you that reversed a...

November 26, 2008  2:43 PM

Reversing a string with VBScript using the mid function

Posted by: Jerry Lees
mid, String manipulation, VBScript

As a part of the VBScript encryption I mentioned working on I needed to find a way to reverse a string. Doing this yielded many possibilities, but this piece of code seemed to work the best (and was the simplest) out of all the pieces of code I came up with to reverse a string. It's simple, but...

October 1, 2008  2:06 PM

Easy string manipulation with VBScript using the Replace Function

Posted by: Jerry Lees
Functions, Replace, String manipulation, VBScript, VBScript Functions

Recently, I had a situation at the office where I needed to check a web.config file for the existence of a setting. Not a hard problem-- just open the file up an look for it, however, that becomes a little harder when your talking about 30 servers. So, I scripted it using the replace...


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: