Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

PowerTip: Use a regular expression pattern to remove nonalphabetic characters

Summary: Learn how to use a regular expression pattern to remove non-alphabetic characters from a string by using Windows PowerShell. (image)  How can I use Windows PowerShell to remove non-alphabetic characters from a string? (image)  To remove nonalphabetic characters from a string, you can use the -Replace operator and substitute an ...

Additional resources for text analysis by using PowerShell

Summary: This is a summary of some of the additional resources for working with text and Windows PowerShell. Good day. Microsoft Scripting Guy, Ed Wilson, is here. So, here's the deal. We are going along and decide to write a simple Windows PowerShell script. Before we know it, the thing has morphed into dozens of lines. And, also before we ...

Calculate percentage character frequencies from a text file by using PowerShell

Summary: Learn how to use Windows PowerShell to calculate the percentage of how often a character appears in a text file. This is the fifth post in a multi-part series of blog posts that deal with how to determine letter frequency in text files. To fully understand this post, you should read the entire series in order. Here are the posts in ...

Compare the letter frequency of two text files by using PowerShell

Summary: Learn how to use Windows PowerShell to compare the letter frequency of two different text files. This is the fourth post in a multi-part series of blog posts that deal with how to determine letter frequency in text files. To fully understand this post, you should read the entire series in order. Here are the posts in the series...