Update the Windows Feature Rule parser to remove the external Data file
Is your feature request related to a problem? Please describe.
The Get-WindowsFeatureName function in the WindowsFeatureRule module does not take advantage of the switch statement regex capability nor do the regex patterns leverage capturing groups.
Describe the solution you'd like
The switch statement should be updated to use regex more efficiently or removed all together and replaced with a single regex with a capturing group. Updating the switch using the following example and move all naming correction in the rest of the switch to a separate task.
switch -Regex ($checkContent -split '\n')
{
$regularExpression.WindowsFeatureName { $windowsFeatureName += $matches['featureName']}
}
Describe alternatives you've considered
Additional context
That has been started in PR #206 but still has a bit of clean up and consolidation that needs to happen before it is closed.