Recently I was tracking down a bug in script for a client. The problem turned out to be a simple typo. I could have easily avoided that by using Set-StrictMode, which I do now, but that’s not what this is … Continue reading → Read More...
< # .SYNOPSIS This script strips out a port and protocol number from a URL .DESCRIPTION This script creates a regular expression reged then uses it to match against the URL to get the protocol and port...
< # .SYNOPSIS This script validates email addresses based on MSFT published Regular Expression. This is a re-write with PowerShell of an existing bit of MSDN sample code ...
In Part 1 , you lerned how Regular Expressions can extract useful information from noise text. In Part 2 , we looked at using Regular Expressions to split text, yet another powerful technique to extract the pieces of information you may need. Today, we conclude our little excurse and use Regular Expressions...
In Part 1 , we used Regular Expressions to extract useful information from noise text. That was pretty cool, and we used the operator -match , the automatic PowerShell variable $matches and the powerful Get-Matches function. Today, we'll use Regular Expressions again, but this time they are used...
Yes, regular expressions can be complex but hey no, they do not need to be! You can do amazing things with small and relatively simple regular expressions. So let’s take a look at it. Finding Information: -match Often, you need some piece of information that is buried inside of noise text. Let’s...
A helpful tool on the way in this series is Robby Foust’s RegEx Quick Reference in PoSHcode.org. The function returns an Object, so you can easy format and filter it to your liking. I like this view the most: get-regex | Format-Table Sequence,meaning -GroupBy table –AutoSize As having a quick regex reference...
Shay pointed me to this excellent series about Regular Expressions Regular Expression Webcast Series , While following this series to fresh up my Regex skill’s, I will post about PowerShell Specifics in this series here. There are more ways to work with regular expressions with PowerShell, for following...