PowerShell - Control Flow
How would you modify this
switch statement to match strings that start with 'error' or 'warn' using regex, and print 'Alert' for both?switch -Regex ($messages) {
'^error' { 'Error found' }
'^warn' { 'Warning found' }
default { 'No alert' }
}