Sometimes you need to replace a value matching a pattern with a new value that's based on that specific match, making it impossible to predict the new value. For these types of scenarios, a MatchEvaluator can be very useful.
In PowerShell, a MatchEvaluator is as simple as a scriptblock with a singl...