Showing tag results for string manipulation

Nov 6, 2006
Post comments count0
Post likes count0

How Can I Extract the Text Between the Header and Footer in a Text File?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I extract the text between the header and footer in a text file?-- LL Hey, LL. Before we answer your question we should point out that, depending on when you’re reading this, you might be missing Day 1 of Windows PowerShell Week. Even as we speak the lovely and talented Jean Ross could be presenting an introduction to W...

Scripting Guy!scripting techniquesVBScript
Oct 18, 2006
Post comments count0
Post likes count0

How Can I Split a String Only on Specific Instances of a Character?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I have a series of string values that I need to convert to an array, splitting the value on the ampersand (&). However, if the ampersand is followed by amp (in other words, if the string is &amp) I don’t want to split the string at that point. How do I do that?-- AK Hey, AK. We apologize for taking so long to post the...

Scripting Guy!scripting techniquesVBScript
May 3, 2006
Post comments count0
Post likes count0

How Can I Remove Blank Spaces Before and After a String Value?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! We have a custom in-house application that writes data to a log file. The problem is that the data often has a bunch of blank spaces before and after it. How can I remove all the blank spaces that come before and after my data?-- KS Hey, KS. You might find this hard to believe, but the Scripting Guy who writes this column occ...

Scripting Guy!scripting techniquesVBScript
Feb 22, 2006
Post comments count0
Post likes count0

How Can I Truncate Names to a Maximum of 16 Characters?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I truncate names to a maximum of 16 characters?-- BN Hey, BN. Brace yourself: it’s time for another trip down memory lane. When one of the Scripting Guys was going to college, he took a temporary summer job with the Green Giant Corporation, working in the office that oversaw the asparagus harvest in eastern Washington...

Scripting Guy!scripting techniquesVBScript
Feb 14, 2006
Post comments count0
Post likes count0

How Can I Convert a DN to this Format: finance.fabrikam.com/Users?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I convert a DN to this format: finance.fabrikam.com/Users?-- CW Hey, CW. You know, this is a pretty good question; in fact, we should have used it for the Winter Scripting Games. Ah, but, on second thought, maybe it’s a good thing we didn’t use it. Why not? Well, because all the Scripting Games competitors could find ...

Scripting Guy!scripting techniquesVBScript